Home   Help Search Login Register  

Author Topic: Trigger activator  (Read 1175 times)

0 Members and 1 Guest are viewing this topic.

Offline Joiner

  • Members
  • *
Trigger activator
« on: 16 Dec 2008, 00:42:16 »
Hello everyone!
I've searched the forum and failed to find an answer to my question, so, could anyone tell me how it is possible in an MP mission to determine the player who activated a trigger? For example, I need something like this: a trigger is activated by a person (by plane or on foot, no matter) and this very person dies upon activating it. Thanks in advance!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Trigger activator
« Reply #1 on: 16 Dec 2008, 07:00:59 »
Within trigger code, every object who "activates" it is put into the thisList array, but outside of the trigger's own scripts, you can get this same array using list myTrigger

Kill all humans that activate a trigger (vehicles are not damaged):
OnAct: { { _x setDamage 1 } forEach (crew _x) } forEach thisList;
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Joiner

  • Members
  • *
Re: Trigger activator
« Reply #2 on: 16 Dec 2008, 11:05:21 »
Thanks a lot!