Home   Help Search Login Register  

Author Topic: trigger activate when group joined  (Read 1386 times)

0 Members and 1 Guest are viewing this topic.

Offline terran4999

  • Members
  • *
trigger activate when group joined
« 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

Offline i0n0s

  • Former Staff
  • ****
Re: trigger activate when group joined
« Reply #1 on: 26 Dec 2008, 02:37:33 »
Condition:
Code: [Select]
unit in (units group)

Offline terran4999

  • Members
  • *
Re: trigger activate when group joined
« Reply #2 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


Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: trigger activate when group joined
« Reply #3 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
Pesky Human!!
Wort Wort Wort.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: trigger activate when group joined
« Reply #4 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.
"When 900 years YOU reach, look as good you will not!"

Offline terran4999

  • Members
  • *
Re: trigger activate when group joined
« Reply #5 on: 27 Dec 2008, 01:38:58 »
Ok thanks, problem solved
« Last Edit: 27 Dec 2008, 01:52:53 by terran4999 »