Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

How do I know whether a light bulb is turned On or Off?

$
0
0
How do I know whether a light bulb is turned On or Off? Example LCD: [Lamp] - Off.
-------------------------------------------------- ------------------------
code:
IMyTextPanel LCD = GridTerminalSystem.GetBlockWithName ("LCDTest") as IMyTextPanel;
IMyInteriorLight Lamp = GridTerminalSystem.GetBlockWithName ("LampTest") as IMyInteriorLight;
if (Lamp.OnOff_Off == OnOff_Off) {// How?
LCD.WritePublicText ("", false);
LCD.WritePublicText («[Lamp] - OFF», true);
}
еlse {...

How do I know whether a light bulb is turned On or Off?

Viewing all articles
Browse latest Browse all 903

Trending Articles