Home   Help Search Login Register  

Author Topic: Event handler question...  (Read 420 times)

0 Members and 4 Guests are viewing this topic.

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Event handler question...
« on: 03 Nov 2004, 23:57:24 »
Hi all,

 I've been reading up on event handlers in the tutorials section... but there's still a few bits I don't understand.

 I'm trying to make a mission where an attack starts when a signal flare is fired (by the player). I understand that _this select 0 is 'who fired?' and _this select 4 is 'with what ammo?', but how do I make sure the trigger for the attack is activated only when the player fires a flare, and not when he fires any other weapon?

Any help would be appreciated, thanks in advance.

Clue

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Event handler question...
« Reply #1 on: 04 Nov 2004, 00:09:48 »
In the particular case of firing a flare, a script is called automatically.      You don't necessarily need an EH.

However, if you are using the EH, its something like

? _this select 4 == "flare" : hint "attack!"
Plenty of reviewed ArmA missions for you to play

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Event handler question...
« Reply #2 on: 04 Nov 2004, 00:17:01 »
have the eventhandler exec a script

here is the script
Code: [Select]
?_this select 4="flare":goto "callAttack"

#end
exit

#callAttack
(here you use whatever you need to make it happen)

goto "end"

under #callAttack you could have: callAttack=true
and the have a trigger with the condition being: callAttack
and synchronize it to the waypoint

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Event handler question...
« Reply #3 on: 05 Nov 2004, 14:05:27 »
Thanks guys... got it working fine now! Cheers for the tips.