Space Engineers

Space Engineers

MGSS Airlock Script 2.0
Asarjan [GER] 2021 年 8 月 20 日 上午 11:10
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
最后由 Asarjan [GER] 编辑于; 2021 年 8 月 20 日 下午 12:07
< >
正在显示第 1 - 1 条,共 1 条留言
Engineered Coffee  [开发者] 2021 年 8 月 31 日 下午 2:48 
Awesome thanks for this addition. I will look into adding as a bool option in the settings on 1 of the next roll outs
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50