OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: stephen271276 on 17 Sep 2009, 17:05:17

Title: Use a trigger only in a certain area?
Post by: stephen271276 on 17 Sep 2009, 17:05:17
is it possible to make a trigger that is only usable in a certain area? ie a small area of town where a firefight is taking place with a radius of say 150... but when you move out of that radius the option to use the trigger via radio disappears?
Title: Re: Use a trigger only in a certain area?
Post by: celoush on 17 Sep 2009, 17:27:17
Code: [Select]
_trg=createTrigger["EmptyDetector",getPos xxx];
_trg setTriggerArea[150,150,0,false];
_trg setTriggerActivation["CIV","PRESENT",true];
_trg setTriggerStatements["this", "1 setRadioMsg ""Call Radio"""];

_trg2=createTrigger["EmptyDetector",getPos xxx];
_trg2 setTriggerArea[150,150,0,false];
_trg2 setTriggerActivation["CIV","NOT PRESENT",true];
_trg2 setTriggerStatements["this", "1 setRadioMsg null"];
Title: Re: Use a trigger only in a certain area?
Post by: stephen271276 on 21 Sep 2009, 13:16:26
Where would I put that??? in the init.sqf?