Introduced in

Version:1.00

Description

Description:

Controls whether a lamp is lit or not.

Can only be used with map-placed lamps, has no effect on editor-placed ones.

Syntax

Syntax:lamp switchLight mode
Parameters:
  • lamp: Object - Lamp object.
  • mode: String - Can be: "ON", "OFF", or "AUTO" (lamp is on during night, and off during day - default).
Return Value:Nothing

Examples

Examples:lamp1 switchLight "off" (nearestObject [player, "Streetlamp"]) switchLight "OFF"

Additional Information

See also: lightIsOn, switchAllLights
Multiplayer:
Problems:

Notes