Space Engineers

Space Engineers

Vehicle Light Control (Script)
42 Comments
Into 9 Apr, 2024 @ 1:00pm 
Is it possible to change the orientation of SemiCircle?
ostlandr 6 Mar, 2024 @ 10:40am 
How do you get the turn signals to blink? Set up the light manually?
Captain Drak 4 Jan, 2024 @ 12:49pm 
Just wanted to pop in and ask if there is a possibility of making hinges/rotors act based off control tag like Tag=Tail would cause them to reverse the hinge/rotor. For dynamic aero like a rear wing (This is the reason I ask). I see that it currently works with steering inputs, but that is it?
Normal Human 14 Jun, 2023 @ 10:57am 
Also a feature where the turn signals turn off if you go above a certain speed would be awesome :D
Normal Human 14 Jun, 2023 @ 9:25am 
Is it possible to get a custom data option for the script to not use the screens of the programmable block its placed in?
Entarlas 6 Feb, 2022 @ 12:04pm 
someone please update this... needs some love.
76561198026697978 14 Oct, 2021 @ 8:02pm 
also having the issue of the script overwriting the custom data for the lights. break lights work, but the forward lights and the turn lights don't seem to want to function. also the programmable block that I have the script in is saying

2 unassigned turn light detected.
Please align the cars straight.
[MTX]Rooster 27 Jul, 2021 @ 7:18pm 
I cannot figure out the front lights.. I have turn, tail, and reverse working flawlessly, however the front do nothing for me. Tried spotlights and interior lights, custom I type front, the script rewrites like all other lights do to TAG=Front etc., but the only way to get any lights for the front is hitting 'L' (the lights command in SE, lol) - and interior lights assigned as fronts do not come on (or off, depending on how I last set them).. When I move forward (or hop in the seat?) they should be coming on/off, correct, like all the other lights do?
BOBspiritus 17 Jul, 2021 @ 11:35am 
for those having iseus with the tail lights you have to put 'front' in the custom data of your front lights that worked for me
GerryWJH 30 Oct, 2020 @ 2:07am 
The script overrides MART PBs that has "Turn" tag in custom data, it's kinda annoying. And I couldn't get the Text Panel as Light or multiple light working:steamsad:
Tzeentch's Aeldari Spirit Stones 17 Oct, 2020 @ 3:57am 
brake lights turn off completely instead of having a dim idle brightness, turn lights are "unassigned" according to the report.. ive already repeatedly tried to do the "Setup" in argument but it doesnt assign the turn signals in both natural gravity and artificial gravity.

edit: fixed the issue with the turn signals by editing the tag from "Tag=Turn" (automatically written into the customdata once the program runs) to "Tag=TurnLeft" or "Tag=TurnRight"

brakelights are still an issue, it turns on when braking, but turns off instead of having a dim idle brightness when idling.
Gregi 3 Aug, 2020 @ 12:08pm 
I have a problem with the tail light. When I brake, the light is on. But not while driving. How can I make the tail light shine while driving? For example, at 50% brightness? Thanks and sorry for my English.
Valerian 13 Apr, 2020 @ 12:51pm 
The LCD part doesn't work, or maybe (probably) I am doing something wrong. THe Text Panel just shows the default "online" sprite, nothing else, despite me entering all that Custom Date Code. :
Skallabjorn 19 Jan, 2020 @ 9:52am 
I use Automatic LCD2 and have displays in my cockpit showing data. If i place COCKPIT in the custom data, the other script of course shows it as an invalid command on the screen, is there a way around this?
Sunoko  [author] 24 Nov, 2019 @ 2:47am 
Sorry Im forget to write about cockpit setting has been changed, please write Cockpit in custom data.
imojinn 3 Nov, 2019 @ 6:00am 
Also having an issue with detecting the cockpit
3DPrintandGame 29 Sep, 2019 @ 6:16am 
It does not deteckt any Cockpit
Shepard (KeGGeR) 2 Feb, 2019 @ 9:46pm 
I've noticed that while the lights are on, the tail lights don't get brighter when the brake is applied
Ziant 23 Oct, 2018 @ 6:09pm 
woohoo. you're right. removed timer block and now the script works.thanks for helping.
Sunoko  [author] 23 Oct, 2018 @ 7:47am 
@哈哈哈哈。。 Try removethe timer block. This script is run without timer block, and probably not working with timer block.(I forgot to erase the description about it, Sorry!)
Ziant 22 Oct, 2018 @ 9:38am 
ok. after i reloaded the script into PB, its custom data automatically added "[Vehicle Light Control] intensity=5 autoSetUp=true" this. but still no vehicle lights work. custom data on my stop light also added this "[Vehicle Light Control] Tail=true ---" by itself. timer block is set to [timer block trigger now] -> [pb with default argument] -> [timer block start]. no error text / warnings on PB. any idea where i did something wrong?
Ziant 22 Oct, 2018 @ 7:12am 
okay. THANKS! will try it and get back to you later. :steamhappy:
Sunoko  [author] 22 Oct, 2018 @ 6:41am 
@哈哈哈哈。。 Open PB Custom Data, and change autoSetup=false to true.
(This option basically for myself. For example, headlight is yellow, brake lamp is not so led etc. I think that it is best to adjust manually by yourself.)
Ziant 5 Oct, 2018 @ 10:27pm 
didn't work for me. reentered the script into problock. checked and recompiled. reset timer block (trigger now, run with default argument, start) on setup action, retyped tail on interior light custom data. no error on problock (no system failure). interior light custom data changed itself. but nothing happens when i tap P to handbrake. interior light is still on white color.
pimikiel 5 Aug, 2018 @ 3:26pm 
yay! LCD fixed, but now even regular interior lights won't intensify on brake when headlights are on ;d
Sunoko  [author] 3 Aug, 2018 @ 7:00am 
@pimikie Script crash are fixed. Also corner lights are "half" fixed, Now tail lights will light while headlights are on, but intensity does not change with brake. It seem SE bug.
Thanks for reporting!

Note: The script setup method has changed. Please delete all the custom data of the light, and re-enter the setting. In the case of turn light, please write "turn". ("right" or "left" are not necessary. script will automatically determine it)
pimikiel 2 Aug, 2018 @ 8:08am 
Oh, and corner lights dont light up with headlights. They lit up only when braking.
pimikiel 2 Aug, 2018 @ 8:02am 
When I place and configure an lcd panel, it works. But as soon as I recompile script with lcd panel placed, script it crashes.
Caught exception during exec. of script: Obj. ref. not set to an instance of an obj.
at Program.LightAutoSetup()
at Program.Run()
at Program.Main()
at Sandbox [...] DisplayClass26
at Sandbox [...] Run.SandboxedProgramAction(Action'1 [...])
Quarior 18 Jun, 2018 @ 8:58am 
@Sunoko, you're welcome and thank for update.
Sunoko  [author] 18 Jun, 2018 @ 5:02am 
@Quarior Oh... maybe, yes. I forgot to update, and now updating latest version. Thanks.
Quarior 17 Jun, 2018 @ 7:44am 
Have you forget to update the script with reverse ? Because for me, doesn't work and when I look your code and also the date of update and your comment, the update code is 21 October 2017 and your commend of added is 3 April 2018.
Thank for answer.
MattPlaysSimulations 3 Apr, 2018 @ 11:06am 
YES! Thanks!
Sunoko  [author] 3 Apr, 2018 @ 3:29am 
@MattPlaysSimulations Reverse lights and sound added :) We need to place light or text panel, sound block and write "reverse" in CustomData to use it.
Also,I added text panel support. We can use it like as a light block.
MattPlaysSimulations 1 Apr, 2018 @ 4:32pm 
@Sunoko, Can you add reverse lights to this?
LeonserGT 21 Oct, 2017 @ 5:52am 
Ah, now it much more clear... and that rotor thingy is adorable :P
Sunoko  [author] 21 Oct, 2017 @ 4:59am 
@[MGE]LeonserGT This script using same light for tail light and brake light. It helps to save space for lights.
I made a video about how this script works. https://youtu.be/H38fk39cqUM
LeonserGT 20 Oct, 2017 @ 10:56am 
Ah, I thought tail lights are for turning on when car brakes, like braking lights... but you can do it without a script - put lower intensity on rear lights and by pressing same button you will turn on all of them
Sunoko  [author] 20 Oct, 2017 @ 8:30am 
@[MGE]LeonserGT Its for trigger tail light. When front light is on, tail light will also light up with low intensity.
LeonserGT 20 Oct, 2017 @ 7:46am 
What is the purpose of front lights there, they're usually triggered manually, no?
Schwarzengel 14 Jun, 2017 @ 4:44am 
copy is not a good habit
Schwarzengel 14 Jun, 2017 @ 4:39am 
...what can i say
Dark_453 13 Jun, 2017 @ 11:11pm 
REALLY Good Work, I subbed to both scripts.
Someone should link this to w4stedspace - and Tex, im sure the firetruck could use some cool light control.
PS: I have only seen EP 7 of steams, so No Spoliers please* (Escape from mars*