Space Engineers

Space Engineers

MGSS Airlock Script 2.0
Asarjan [GER] Aug 20, 2021 @ 11:10am
Rotation lights on when outer doors/ gates are open
I hope it's ok to write this here. Because it took me a while to figure out how to do it.

For those who have a rotating light in their airlocks / hangars and want it to be on when the outer doors are open.

Just add

else if (lightState == "Standby"){ light.Enabled = true; }
to the code at line 937.
It should then look like this:


if (rLights[id].Count != 0){
for (int i = 0; i <rLights[id].Count; i++){
IMyReflectorLight light = (IMyReflectorLight)rLights[id][i];
light.Color = lightsCyclingColor;
if(controlRotation == true){light.SetValue("RotationSpeed", rotationSpeed);}
if (lightState == "Cycling"){
light.Enabled = true;
}
//======== > insert
else if (lightState == "Standby"){
light.Enabled = true;
}
//======== here <
else{
light.Enabled = false;
}
}
}

I hope this helps some people. Have a nice day and see you in space :D
Last edited by Asarjan [GER]; Aug 20, 2021 @ 12:07pm
< >
Showing 1-1 of 1 comments
Engineered Coffee  [developer] Aug 31, 2021 @ 2:48pm 
Awesome thanks for this addition. I will look into adding as a bool option in the settings on 1 of the next roll outs
< >
Showing 1-1 of 1 comments
Per page: 1530 50