Home   Help Search Login Register  

Author Topic: Trigger Conditions about different units  (Read 1597 times)

0 Members and 1 Guest are viewing this topic.

Offline Cold

  • Members
  • *
  • Mission Maker
Trigger Conditions about different units
« 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.

A leader is best when people barely know he exists, when his work is done, his aim fulfilled, they will say: we did it ourselves. <br />Lao Tzu

Offline F2kSel

  • Members
  • *
Re: Trigger Conditions about different units
« Reply #1 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.

« Last Edit: 19 May 2011, 16:36:23 by F2kSel »

Offline Cold

  • Members
  • *
  • Mission Maker
[SOLVED] Trigger Conditions about different units
« Reply #2 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!
« Last Edit: 28 May 2011, 05:08:14 by Cold »
A leader is best when people barely know he exists, when his work is done, his aim fulfilled, they will say: we did it ourselves. <br />Lao Tzu