OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: terran4999 on 26 Dec 2008, 01:44:25

Title: trigger activate when group joined
Post by: terran4999 on 26 Dec 2008, 01:44:25
hey

How do you make a trigger activate when a unit has joined a group. I want to do this without WP's
Title: Re: trigger activate when group joined
Post by: i0n0s on 26 Dec 2008, 02:37:33
Condition:
Code: [Select]
unit in (units group)
Title: Re: trigger activate when group joined
Post by: terran4999 on 26 Dec 2008, 05:36:24
Ok, i keep getting a error. Here is what i did, first i name my group that will be performing the capture operation. In the Init of group leader I type:
Quote
east1=group this
then I name the unit i am trying to rescue POW1

In the condition field of trigger i type
Quote
POW1 in (east1)
and then i get the following error message

(http://h1.ripway.com/terran4999/error2.jpg)
Title: Re: trigger activate when group joined
Post by: Luke on 26 Dec 2008, 07:00:56
In the init of the groupleader try:
Code: [Select]
east=group this; east1=[]; {east1=east1+ [_x]} foreach east;

Hope that helps!

Luke
Title: Re: trigger activate when group joined
Post by: Wolfrug on 26 Dec 2008, 11:36:31
Actually, terran, if you'd just followed the example given you'd've been fine ;)

Code: [Select]
POW1 in (units east1)
east1 = a group
(units east1) = an array of all the units in the group east1

the command "in" needs an array most often, so you need to use the units command to get that.  :good:

Wolfrug out.
Title: Re: trigger activate when group joined
Post by: terran4999 on 27 Dec 2008, 01:38:58
Ok thanks, problem solved