Hey Belacios, there was a
similar thread here that I gave an answer to. It works by placing invisible dynamic objects near a light source and using plrdistwithin/plrdistfurther to determine if the player is in the light. However, instead of showing a hud (from the other thread) a variable may be best used. Here's the modified script:
:state=0:dimvar=stealth,setvar=stealth 0
:state=0:state=1
:state=1,plrdistfurther=75:setvar=stealth 0,state=2
:state=2,plrdistwithin=75:setvar=stealth 1,state=1
And in the character script, you would add a line of code to the detection part. For example:
:state=0,plrdistwithin=50,varequal=stealth 1:rotatetoplr,state=2
Or along those lines. Hope this helps

- An Instinctive Fear IndieDB page, download the demo today!