This is an old revision of the document!
Enables or disables the light attached to the specified entity (with the assumption that the entity is a light source).
|entity||Entity that will have its light enabled or disabled.||Entity||Yes|
|enabled||Determines the light's state (on or off).||Boolean||Yes|
If you'd like to change the color of the entity's light instead of toggling it on or off, see the related Set Entity Light Color function.
Results: The entity with an ID of “lamp” will have its light disabled (i.e. it will be turned off and no longer cast light until turned on again).
Use the Set Entity Light Enabled function to toggle a room's light on and off when the player interacts with a switch or button.