Space Engineers

Space Engineers

Advanced Brake Lights
40 kommentarer
etopsirhc  [ophavsmand] 19. feb. 2024 kl. 16:57 
honestly idk, been so long since i touched it.
kinngrimm 8. feb. 2024 kl. 19:55 
does this work with groups?
ninjawizard 7. maj 2022 kl. 1:43 
fantastic script! i love that it work with ships too!
Parker Posey's Mouth 6. feb. 2022 kl. 22:35 
Thanks, Hanels!
hanels 28. jan. 2022 kl. 4:58 
just add [Brake] into block's name and it will work. Unfortunelly it doesnt work with groups :/
Parker Posey's Mouth 28. jan. 2022 kl. 4:49 
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  [ophavsmand] 2. aug. 2021 kl. 3:21 
try if (cockpit.MoveIndicator.Z < .2f && cockpit.MoveIndicator.Z > -.2f )
hanels 1. aug. 2021 kl. 23:45 
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  [ophavsmand] 1. aug. 2021 kl. 16:56 
use > 0 or < 0 for that. if Z = 0 then it's not being pressed.
hanels 1. aug. 2021 kl. 14:41 
+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  [ophavsmand] 1. aug. 2021 kl. 13:57 
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 kl. 13:52 
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  [ophavsmand] 1. maj 2021 kl. 17:26 
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. maj 2021 kl. 14:36 
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  [ophavsmand] 28. apr. 2021 kl. 14:35 
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 kl. 13:04 
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 kl. 6:56 
this is perfect!! thank you more making this!
etopsirhc  [ophavsmand] 18. juni 2020 kl. 17:20 
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. juni 2020 kl. 16:51 
A nice and easy script! Thank you. Just wondering, is it possible to make this work with the handbreak option?
Baboo85 9. juni 2020 kl. 17:59 
Very cool thanks
etopsirhc  [ophavsmand] 1. feb. 2020 kl. 23:38 
fixed now
etopsirhc  [ophavsmand] 1. feb. 2020 kl. 12:31 
thank you, i'll be sure to fix my mess up later today, as well as make a backup lol.
Chrishel 1. feb. 2020 kl. 11:48 
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  [ophavsmand] 1. feb. 2020 kl. 10:15 
@chrishel could you copy the script and put it on pastebin, then link that to me?
Chrishel 1. feb. 2020 kl. 8:04 
@etopsirhc I have it on a vehicle in my creative build. Where do you want it sent?
etopsirhc  [ophavsmand] 28. jan. 2020 kl. 14:59 
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. juni 2019 kl. 8:05 
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. juni 2019 kl. 8:01 
Hehe that would be Wonderfull! Love the functions, but strange when 3 rovers light up at once and only 1 brakes 😜
etopsirhc  [ophavsmand] 5. juni 2019 kl. 12:20 
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. juni 2019 kl. 14:32 
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 kl. 23:34 
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  [ophavsmand] 7. sep. 2018 kl. 21:48 
@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 kl. 21:10 
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 kl. 13:27 
ah yea i did have things set in groups xD did not know it only looked for single items.
etopsirhc  [ophavsmand] 1. sep. 2018 kl. 9:11 
@ 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 kl. 8:38 
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  [ophavsmand] 29. aug. 2018 kl. 22:07 
@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 kl. 4:25 
This is awesome thanks!! Quick question or request rather, I don't suppose you can make it also be useable on flight seats?
etopsirhc  [ophavsmand] 10. mar. 2018 kl. 15:24 
thanks, glad prople are getting some use out of it.
Domi 10. mar. 2018 kl. 1:24 
Here´s a german tutorial about this script! Nice work etopsirhc ;)

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