Home   Help Search Login Register  

Author Topic: EventHandler for a whole group?  (Read 734 times)

0 Members and 1 Guest are viewing this topic.

Offline Wildebeest

  • Contributing Member
  • **
  • The time the wildebeest ruled the Earth.
EventHandler for a whole group?
« on: 01 Dec 2002, 00:51:46 »
I have a question about the "evenHandler" command. I'm using in in a way that allows the player to move safely amongst his enemies as long as he doesn't open fire himself:

condition: this

activation: Ap addEventHandler ["Fired",{_this exec "guyfired.sqs"}]

deactivation: Ap removeAllEventHandlers "Fired"; Ap setCaptive true

---------------------------------

;SCRIPT - guyfired

_ap = _this select 0
?_weapon != "HK" : ap setcaptive false
_muzzle = _this select 2
_mode = _this select 3
_ammo = _this select 4

_ap setcaptive false

Now what I would like to do is to turn the player "Ap" into a group. I want the enemies to be upset and angry with everybody in the group, regardless of which soldier started the shooting.

Thanks you're the best Cheers :)
Weeee...