OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Gen.Iceman on 14 Dec 2012, 19:25:26
-
I would like to count how many "Misc_cargo_cont_net1" there are in a trigger list. How would I do this? isKindOf will not work.
-
{typeOf _x isKindof "Misc_cargo_cont_net1"} count TriggerList;
This may also work:
{typeOf _x == "Misc_cargo_cont_net1"} count TriggerList;
-
Thanks. I tried using both of those as a trigger condition + anybody present, 20x20.
{typeOf _x == "Misc_cargo_cont_net1"} count thisList > 0
onAct: hint "Inside"
The trigger never fired, when I brought the container inside the trigger.
-
The anybody in triggers dosent work for static objects. Use nearestObject instead with condition like this:
thisTrigger distance (nearestObject [thisTrigger, "Misc_cargo_cont_net1"]) < 20