OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Ironman on 16 Apr 2008, 07:58:12
-
Ok, I tried searching for about 45min for a cure to this but haven't seen it. I want to make a trigger set the player group(s) [sf1, sf2] to non-captives if they capture an enemy officer. I thought something like this would work, but I get an error complaining about how "e1_3 in sf2" is expecting an Array.... not a group name.
In trigger:
Condition: this || e1_3 in sf1|| e1_3 in sf2
Activation: player setCaptive false;
-
what are el_3, sf1 and sf2?
-
Indeed so: el_3 is a UNIT whereas sf1/2 are GROUPS. To be able to compare units to units, you need to use (units sf1), as so:
this || e1_3 in (units sf1)|| e1_3 in (units sf2)
Should work, try it out! :good:
Wolfrug out.
-
if sf1 and sf2 are groups and el_1 is a unit it might be more efficient to just compare with the group:
group el_1 in [sf1, sf2]or
(group el_1 == sf1) || (group el_1 == sf2)
-
I am sorry I wasn't more precise... yes e1_3 is a unit where as sf1/2 are groups
Thanks for your immediate help guys.... I tell everyone I know to come here... unless I know the answer... :dunno: