OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pointman on 31 Jan 2003, 07:51:40
-
Is there a way, in a script file for a trigger, to determine who set off the trigger?
I mean, if in my mission i have [] Exec "trigger1.sqs"
Then in the file trigger1.sqs, can i determine who set it off? Nearest player won't do, it could be a radio trigger with range 9999 for all we know :P
any ideas?
-
there is no way you can do it with a radio trigger.
you can do it with a good'ol regular activated by presence trigger though.
I'm not at home right now so I can't look into it, but I have it in one of my missions.
-
It'd be nice to know who set off a trigger, yes.
Any other ideas?
-
You can get a list of all the units in a trigger area...
If you use the OnAct line:
thislist exec "trigger1.sqs"
To execute your script, you'll send the list off all units in the trigger radius to the script as _this.
Just something to note, the trigger must be set to a present condition to do this, and if you have it set to west present it will only 'see' west units, and east it will only 'see' east.
Anybody present means it will see all four sides (East, west, civvies and Resistance).