Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Trigger activator  (Read 2174 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!