Jump to content

get unit X to join a group when he is in an area

Recommended Posts

Problems on join


I need a trigger to snatch to people from a group and make them join another group. I have options to do a radio-trigger to make say 2 people out of 6 to join a group. But only 2.

The group the join is called TRUCKDRIVERGROUP, the leader is called Driver1truck.


I dont know which one will be chosen for the "drive Job", therefor i dont know the NAMES of the units-. 



i tried following

-> trigger Area 50x50 blufor present


condition (for now) is 





failed option 1

[(vehicleVarName (thisList select 0))] joinsilent Sl1;


failed option 2

NameVAR1 = vehicleVarName (thisList select 0

NameVAR1 joinsilent Sl1;


And tried a lot of others to..


So please help me figure this out.






Share this post

Link to post
Share on other sites

How this kind of trigger works:

Waiting for a BLUFOR unit (man, car, tank, air.. any Blu) and checking cond. every 0.5 sec.

If BLU goes inside (BLUFOR present), the first unit triggers the cond. to true and thisList is like updated within 0.5 sec.slot. Then, the code (on act.) runs.

ThisList is updated on real time but your code is already run.



1 - REMEMBER thisList works with activation predefined options (here BLUFOR present). If set to none none, thisList will remain definitely an empty array.

2 - If repeatable (not your case), the trigger's condition must turn to false for deact. (and thisList doesn't mean anything on deact.). The trigger needs to deact. before re-act if you want to work with thisList again.


So, if your units are spaced >>  thisList in act. code will return only one unit (first one, then the code runs).

If the units are close from each other: the code will run with possibly more units in thislist (0.5 sec. slot).

The type of units doesn't matter if BLUFOR. You need to add some more conditions.



- Selecting infantry only, to avoid any air or car activating this trigger: this && {_x isKindOf "CAManBase" } count thislist > 0

- Or, you need 2 infantry people: this && {_x isKindOf "CAManBase" } count thislist == 2

Little problem (to be precise): the condition is OK but, remember, thisList is depending on predefined activation options (BLUFOR present).


Imagine a Hunter with 2 guys inside. the Hunter enters the trigger area. Nothing happens. Normal so far. Make the two guys dismount: 2 infantry BLUFOR units, the condition is true, but thisList will return the 2 guys... + the emptied Hunter because this vehicle stays BLU for some time before getting a civilian status. Not really a problem for you. There is no error trying to make this empty car joining a group.


Then, shift to other group. Despite the little problem depicted above, just write in on act:

thisList join sl1;

What else?




Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now