Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:

Check if a streetlamp is on (shining). Can only be used with map-placed lamps; editor-placed ones cannot be checked.

Use switchLight or switchAllLights to turn streetlamp on / off.

Syntax

Syntax:lightIsOn lamppost
Parameters:
  • lamppost: Object - Lamppost object.
Return Value:String - Lamp status. Possible values are:
  • "ON": On.
  • "OFF": Off.
  • "AUTO": Lamp is on during the night, and off during the day.
  • "ERROR": Object cannot be checked (either not a lamp, or not a map-placed lamp).

Examples

Examples:if (lightIsOn lamp == "ON") then {hint "Nighttime"}

Additional Information

See also: switchLight, isLightOn
Multiplayer: 
Problems: 

Notes