This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
set_entity_light_enabled [2017/08/11 21:32] – created justin | set_entity_light_enabled [2018/03/16 09:48] – justin | ||
---|---|---|---|
Line 4: | Line 4: | ||
Enables or disables the light attached to the specified entity (with the assumption that the entity is a light source). | Enables or disables the light attached to the specified entity (with the assumption that the entity is a light source). | ||
+ | ====Signature: | ||
<code python> | <code python> | ||
set_entity_light_enabled(entity, | set_entity_light_enabled(entity, | ||
Line 10: | Line 11: | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
|entity|Entity that will have its light enabled or disabled.|[[Entity]]|Yes| | |entity|Entity that will have its light enabled or disabled.|[[Entity]]|Yes| | ||
- | |enabled|Determines | + | |enabled|Determines the light's state (on or off).|[[Boolean]]|Yes| |
+ | |||
+ | <WRAP center round info 100%> | ||
+ | If you'd like to change the color of the entity' | ||
+ | </ | ||
====Example: | ====Example: | ||
Line 16: | Line 21: | ||
set_entity_light_enabled(entity[" | set_entity_light_enabled(entity[" | ||
</ | </ | ||
- | // | + | // |
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | Use the **Set Entity Light Enabled** function to... | + | 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. |
</ | </ | ||