Space Engineers

Space Engineers

Advanced Brake Lights
40 Comments
etopsirhc  [author] 19 Feb, 2024 @ 4:57pm 
honestly idk, been so long since i touched it.
kinngrimm 8 Feb, 2024 @ 7:55pm 
does this work with groups?
ninjawizard 7 May, 2022 @ 1:43am 
fantastic script! i love that it work with ships too!
Parker Posey's Mouth 6 Feb, 2022 @ 10:35pm 
Thanks, Hanels!
hanels 28 Jan, 2022 @ 4:58am 
just add [Brake] into block's name and it will work. Unfortunelly it doesnt work with groups :/
Parker Posey's Mouth 28 Jan, 2022 @ 4:49am 
I'm not actually sure how to apply the "tags" to blocks. Apologies for the newbie question, I'm just new to scripting mods. :llama:
etopsirhc  [author] 2 Aug, 2021 @ 3:21am 
try if (cockpit.MoveIndicator.Z < .2f && cockpit.MoveIndicator.Z > -.2f )
hanels 1 Aug, 2021 @ 11:45pm 
So I changed axis for the brakes and > to < so now it has different reaction like reverse, but it still do not work for forward, only backward.. I should learn programming :D

if (cockpit.MoveIndicator.Z < .2f)
etopsirhc  [author] 1 Aug, 2021 @ 4:56pm 
use > 0 or < 0 for that. if Z = 0 then it's not being pressed.
hanels 1 Aug, 2021 @ 2:41pm 
+Y axis is for the Brake (UP) and -Z axis is for reverse (backward). But I dont know how to recognize +Z and -Z
etopsirhc  [author] 1 Aug, 2021 @ 1:57pm 
if you look where i turn off the break lights, the axis in that if statement should be the one you need. i believe it's the Z axis, but i don't have the src at hand right now to be sure.
hanels 1 Aug, 2021 @ 1:52pm 
Hello, script works well but I want to use him to work in different way - brake lights -on- when not moving and -off- if moving forward or backward, but I dont know how you control the direction of the axis XYZ. Same script I want to use for exhaust, so they turn On if I go forward or backward. Same string as for the -reverse- but for both directions, thank you
etopsirhc  [author] 1 May, 2021 @ 5:26pm 
no worries, and feel free to.
the wireless thing though sounds like a bug in SE maintaining a block reference that it shouldn't have access to.
JarutheDamaja 1 May, 2021 @ 2:36pm 
Sorry to be a bother, but I forgot to ask, would it be ok for you if I upload a blueprint with your scipt in it?

It all works great so far, even when reversing and pressing space at the same time.
Detaching the trailer works also, however the script is capable of controlling the disconnected sub grid "wirelessly". At least until I save and load the game again.
I'm running another script for the indicators for now and that behaves the same way.
But I guess I just add a recompile command to the attach/detach timerblock.
Shouldn't be an issue.
etopsirhc  [author] 28 Apr, 2021 @ 2:35pm 
i dont believe there would be any problem with using the brake and reverse tags together, it could end up turning them on or off when you dont want, but i think that would only come into play when reversing and hitting the breaks.

while i dont have any plans to update the script currently, if you look into the script the way it's setup is the control axis of the block tagged as cockpit is saved to a variable. if that variable passes a threshold it turns on or off the group defined by the tag. that way you could add the indicators into the script if you wanted.

i believe i left it open to work on subgrids, but you would need to rerun it after the grid is attached. that way it knows to use those tagged blocks too, as it does the resource heavy search just once at the start, and not on every keypress.
JarutheDamaja 28 Apr, 2021 @ 1:04pm 
Works really nice and smooth, although I must say I would "abuse" the Reverse mode for braking.
Because I brake with "S" and not with "Space" which is the handbrake for me.
Does anything speak against using [Brake] and [Reverse] tag together on the same lights? So far it works great for me.

Plus it's the first script that I encounter, that allows to use the tagged lights also manually. Which would be great for my indicators. But I know the script is called advanced brake lights :)

PlusPlus it does work also on the subgrid trailer.
ImperialHamster 1 Nov, 2020 @ 6:56am 
this is perfect!! thank you more making this!
etopsirhc  [author] 18 Jun, 2020 @ 5:20pm 
currently their isnt, but with some modification you could check the seat to see if the handbreak is enabled and run the toggles when it changes state.
AceBase 18 Jun, 2020 @ 4:51pm 
A nice and easy script! Thank you. Just wondering, is it possible to make this work with the handbreak option?
Baboo85 9 Jun, 2020 @ 5:59pm 
Very cool thanks
etopsirhc  [author] 1 Feb, 2020 @ 11:38pm 
fixed now
etopsirhc  [author] 1 Feb, 2020 @ 12:31pm 
thank you, i'll be sure to fix my mess up later today, as well as make a backup lol.
Chrishel 1 Feb, 2020 @ 11:48am 
etopsirhc's brake light script [pastebin.com] I don't have a pro pastebin or I'd have just messaged it. Here you go!
etopsirhc  [author] 1 Feb, 2020 @ 10:15am 
@chrishel could you copy the script and put it on pastebin, then link that to me?
Chrishel 1 Feb, 2020 @ 8:04am 
@etopsirhc I have it on a vehicle in my creative build. Where do you want it sent?
etopsirhc  [author] 28 Jan, 2020 @ 2:59pm 
TO ANYONE USING THIS SCRIPT, Please send me a copy of it! i messed up when fixing another script and accidently overwrote this one with my transmitter/reciver one.
Knut A. 13 Jun, 2019 @ 8:05am 
A side note, im using trailers, so maybe allow for subgrids to put on lights? Another idea is to increase the light intensity when braking, change color to White when backing up and than back to red low intensity when driving? (maybe name that combi lights in case someone wants to separate them like they are now? That way you can also have extra brakr/reversing lights?
Knut A. 13 Jun, 2019 @ 8:01am 
Hehe that would be Wonderfull! Love the functions, but strange when 3 rovers light up at once and only 1 brakes 😜
etopsirhc  [author] 5 Jun, 2019 @ 12:20pm 
i can update it to add a single / multi grid toggle. as well as overhaul it since it's been so long since i even looked at this script. (kinda surprised it's not more broke lol)
Knut A. 4 Jun, 2019 @ 2:32pm 
Hi, when I use this script all vehicles that has the brake tag on lights light up if I brake. any way to fix that?
SurfinCowboyGaming 7 Sep, 2018 @ 11:34pm 
Thank you. I was able to fix it before the update all I did was recompile it, and it works now. Thanks for your help though.
etopsirhc  [author] 7 Sep, 2018 @ 9:48pm 
@Farmer Jon ok, just updated it adding some debugging tools. you should be able to update the script then set "DEBUG" to true. then once you recompile it will show to the right what all it's found. if you're still having trouble send me a copy of the blueprint and i'll look at it.
SurfinCowboyGaming 7 Sep, 2018 @ 9:10pm 
I have all lights labeled properly, but when I stop or go in reverse the lights don't go on. Am I doing something wrong?
DarkkSkyrow 1 Sep, 2018 @ 1:27pm 
ah yea i did have things set in groups xD did not know it only looked for single items.
etopsirhc  [author] 1 Sep, 2018 @ 9:11am 
@ DarkkSkyrow the only thing i can think of is you may be using a tagged group. i have it set to search for single blocks instead of groups. if it's not that send me a blueprint and i can check to see what's happening.
DarkkSkyrow 1 Sep, 2018 @ 8:38am 
Cant seam to get the brake lights and revers lights functions to work any special setup with lights i need to do? (other then set the takgs)
etopsirhc  [author] 29 Aug, 2018 @ 10:07pm 
@Crazzyt9 i'm guessing you mean to be able to run it from a passenger seat, as in it's last setup it would work from any seat. passenger, large ship seats, and cockpits. however the passenger seat if controlling the vehicle through a remote control block did nothing.
i've since fixed that so even remote controling your creation will make the lights function just the same. just need to add the [Seat] tag to what ever you are driving the vehicle through.
Crazzyt9 29 Aug, 2018 @ 4:25am 
This is awesome thanks!! Quick question or request rather, I don't suppose you can make it also be useable on flight seats?
etopsirhc  [author] 10 Mar, 2018 @ 3:24pm 
thanks, glad prople are getting some use out of it.
Domi 10 Mar, 2018 @ 1:24am 
Here´s a german tutorial about this script! Nice work etopsirhc ;)

https://www.youtube.com/watch?v=4kIa8SQrLEw&