|Description:||Normally, the light bulb (Objects / Scenery - furniture) will automatically turn itself on during night (6pm to 6am).|
This behavior can be overridden either via the action menu (by pointing at it when nearby, and selecting the "Turn on" or "Turn off" action), or via a script.
Once a lamp has been switched manually, the automatic switching is terminated.
The light status can be checked via the lamp's getVariable "light",
|Syntax:||[bulb,mode,brightness,color] execVM "\vbs2\structures\Misc\data\scripts\lightswitch.sqf"|
|Return Value:||Boolean - if called with mode "checkon" or "checkoff"|
_nul = [bulb,"on"] execVM "\vbs2\structures\Misc\data\scripts\lightswitch.sqf"
_status = [this,'checkon'] call compile preprocessfile '\vbs2\structures\Misc\data\scripts\lightswitch.sqf'