Space Engineers

Space Engineers

62 ratings
Change Light Color
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.629 KB
10 Mar, 2015 @ 4:06pm
16 Sep, 2016 @ 5:42pm
11 Change Notes ( view )

Subscribe to download
Change Light Color

Description
Change Light Color

An in-game script to Change the Colour of a Group of Lights or more.

To use place a Programmable Block, go to the Programmable Blocks Control Panel. Click on Edit to edit the Script, then click on Browse WorkShop, the script should be located here. Double click to add the Text to your block.

BASIC USAGE

Once added run the script using a trigger passing over a minimum of 2 Arguments and a maximum of 3, separated by a comma.

The first Argument needs to be the Name of a group of lights.
The second Argument needs to be the Name of a Colour (Located in the script).
The third Argument is optional and is the Blink Interval.

Examples

Lights_Group_01, Green
Lights_Group_01, Red, 0.75

ADVANCED USAGE

Advanced usage requires editing the values in the script, the Advanced usage can change multiple groups of Lights with many different colours, using one trigger. To use change the 'GroupsToChange', 'OnEnableColours' and 'OnDisableColours' found in the Advanced Editing part of the script.

You can add an Optional Blink Interval for each group by changing the 'BlinkIntervals' in the Optional section.

View the comments section in the script for more information.

UPDATES

Update v4.4.1

Mod API Fix.

Group Blocks function changed in Space Engineers version 1.141.

Update v4.3.5

Basic: Can pass over Group Name, Colour and Blink Interval as Arguments
Advanced: Can add multiple Groups with different Colours for one Trigger.

Update v3.3.2

Can pass over Group Name, Colour and Blink Interval as Arguments allowing easy colour change without editing the Script. Blink Interval is optional.

Update v2.4.2

Bug Fixed

Block Groups function changed in Space Engineers version 1.091.

Update v2.3.1

Only uses One Programmable Block.

You can now have colours for each group.

You can now have an Optional Blink Interval.

Place a Timer Block and set the value 'TimerBlockName' in the script to the name of the Timer Block. Set the Timer Block Trigger to turn on all the Lights you want to use the Blink feature.

Update v1.1.0

Spot Lights can be changed. (Lights in the future or modded should be changeable too).
You can change more than one Group of Lights.
67 Comments
Belfontan 5 Jan, 2021 @ 5:22pm 
@Netherspark
You can trigger more groups at once with a timer block.
Otherwise: No

@mipam
I don't think so
mipam 3 Oct, 2019 @ 12:13am 
Greate script. Is it possible to change lcd background light as well?
Netherspark 7 Sep, 2019 @ 12:29pm 
Is it possible to have it toggle two light colours with a single trigger?
Belfontan 18 Apr, 2019 @ 11:33am 
@Zues
Yes you can do that, but you will have to adjust the blinking offset by yourself.
After that you can switch between running and static light with f.e. a sensor or a Timer.

Aktiv:
MyRunningLightsGroupForPad3A,YELLOW,3

Inaktiv
MyRunningLightsGroupForPad3A,WHITE,0
Belfontan 18 Apr, 2019 @ 11:28am 
@Freedom isnt free (Swazzo)
How they are called is on you.
You will have to send the PB commands like:

ThisIsMyAwesomeLandingPadBlinkyFlashLightsHell,Green,3

This will make your Group of lights (or single light) named "ThisIsMyAwesomeLandingPadBlinkyFlashLightsHell" to blink in green every 3 seconds.

@Sythius
Very nice script! Works very well.
Thank you so much.
SwazzozzawS 3 Sep, 2018 @ 6:01am 
How do you use it do I group the blocks together what do they have to be called
Zues 3 Apr, 2018 @ 8:05pm 
just saw this scrtipt and its is amazing I have been needing this for a long time, for my airlocks so people would know if there was air in an airlock or not.

Now for the very importent question can this be set up to do running lights? 2 rows of lights lets say 10 lights long. so you could have them running outward for exiting ships and press a button and have them running inward for incoming ships?
SuperKooks 28 May, 2017 @ 2:23pm 
Ok, thx
Sythius  [author] 24 May, 2017 @ 12:25pm 
I will have a look at the script and make sure everything is running fine. I have not used it in a while, I will see if there is any upgrades I can do.
SuperKooks 17 May, 2017 @ 3:00am 
This isn't working for me. I am using 01.180.4 minor. I am using the arguments All_Lights, Red
All_Lights is the name of my group im trying to change the color of. If anyone could help me, it would be appreciated.

UPDATE:
When I use the group name "Lights_Group_01" it works fine.