I.
You need a light with a unique name like "myLight01" for example.
Then you make a Trigger Zone and attach this script to it:
(copy the script into the scriptbank/user folder)
;Artificial Intelligence Script
;Header
desc = Plr In Zone activates a Light
;Triggers
:state=0,plrwithinzone=1:activateifused=1,state=1
:state=1,plrwithinzone=0:activateifused=0,state=0
;End of Script
The script turns the flicker light on when player is in zone and off if player leaves the zone.
If you only want to turn the light on use this script:
;Header
desc = Plr In Zone activates a Light
;Triggers
:state=0,plrwithinzone=1:activateifused=1,state=1
;End of Script
II.
Tipe the name of the light (myLight01) in the IF USED field of the Trigger entity.
III.
Attach this script to the light.
It is not the light2 script.
The light2 script turns the light on by default.
This one turns the light off by default.
;Artificial Intelligence Script
;Header
desc = Light Flicker
;Triggers
:state=0:lightoff,state=1
:state=1,activated=1:state=2
:state=2,random=5:state=3
:state=2,activated=0:state=0
:state=2:lightoff
:state=3:lighton,state=2
;End of Script
If you want the light go on flickering when you leave the Trigger Zone use this script:
;Artificial Intelligence Script
;Header
desc = Light Flicker
;Triggers
:state=0:lightoff,state=1
:state=1,activated=1:state=2
:state=2,random=5:state=3
:state=2:lightoff
:state=3:lighton,state=2
;End of Script
IV.
Dont forget to activate "Dynamic Lighting" in the Preferences menue before testing the scripts