Hi guys,
Igor Drukov's tutorial on eventhandler's has been really helpful but I'm still a little bit stuck. I'm trying to devise a script in which a chopper will come into an LZ once the player fires a flare. I'm using the SEB flaregun for this purpose. I'm calling it using p AddEventHandler ["fired",{_this exec "flarefire.sqs"}]. As you'll see, at the moment I'm just trying to detect whether the player has just fired a flare or something else.
; flarefire.sqs
_ammo = _this select 4
hint "Event handler set, wait two seconds"
~2
?_ammo = "sebflarered":goto "yes"
hint "Flare not launched"
exit
#yes
hint "Flare was launched"
exit
I'm sure I'm doing something really obvious wrong, I just don't now what it is!
Any help would be much appreciated.
DarkOut.