
Hydrogen
Joined: Dec 6, 2009
Wort Wort Wort...
|
Posted: Jun 19, 2010 01:35 PM
Msg. 1 of 4
Can someone give me a example script for detectin if your flashlight is on and off
|

FtDSpartn
Joined: May 1, 2009
Verified AI.
|
Posted: Jun 19, 2010 07:40 PM
Msg. 2 of 4
(script continuous flashlightdetection (if (= (unit_get_flashlight_state (list_get (players) 0)) (begin (stuff) ) ) )
I do not know if unit_get_flashlight_state is a command,it is just by memory. I have almost no (if statement practice,so if this is wrong,someone correct it please. Edited by FtDSpartn on Jun 19, 2010 at 07:41 PM
|

Hydrogen
Joined: Dec 6, 2009
Wort Wort Wort...
|
Posted: Jun 19, 2010 07:54 PM
Msg. 3 of 4
i dont think it works on would be like flashlight 1
then off would be like flashlight 0
|

FtDSpartn
Joined: May 1, 2009
Verified AI.
|
Posted: Jun 19, 2010 08:17 PM
Msg. 4 of 4
Yeah for on you would put (script continuous flashlightdetection (if (= (unit_get_flashlight_state (list_get (players) 1)) (begin (stuff) ) ) )
|