OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Cold on 16 May 2011, 16:35:41

Title: Trigger Conditions about different units
Post by: Cold on 16 May 2011, 16:35:41
I need my mission to end when three units (civilians who become added to any of 3 different BLUFOR groups) are present inside a trigger area. (hostage_1, hostage_2, hostage_3)
I cannot group all three units to the trigger, and have tried using an array "[hostage_1, hostage_2, hostage_3] distance obj1 < 40" Where obj1 is the name of the trigger. I do not want this triggered based on if they are alive or not, but whether these three units are simply within the trigger area, but cannot for the life of me think of the commands to produce the end result. 
As mentioned above, they may change from "civilian" to "blufor/west" once they're added to the player groups, which is why I need it coded.

Title: Re: Trigger Conditions about different units
Post by: F2kSel on 19 May 2011, 16:26:52
I'm not sure of the question but a simple way to see if all three units are within a trigger would be.

cond
hostage_1 in thislist && hostage_2 in thislist &&  hostage_3 in thislist

the above will only work for alive units.

cond
hostage_1 distance  obj1  <=40  && hostage_2  distance  obj1  <=40 &&  hostage_3 distance  obj1  <=40

would work for either alive or dead.

Title: [SOLVED] Trigger Conditions about different units
Post by: Cold on 19 May 2011, 17:28:33
Thanks F2kSel. I'll give that a shot tonight. I actually tried:

cond
[hostage_1,hostage_2,hostage_3] in thislist

I tried it last night, but that didn't work. I'll try your first answer tonight because I definitely want the civilians arriving there alive (the mission fails if any of them die). I also apologize if the question I asked was convoluted or not organized well enough to provide an answer to.

EDIT: So What you initially put about placing "hostage_1 in thislist && hostage_2 in thislist &&  hostage_3 in thislist" in the condition field worked - I was just forgetting to assign a "side" for the activation - blufor, civilian, etc. I set BLUFOR since they're added to BLUFOR, and everything goes off as planned after that!