Home   Help Search Login Register  

Author Topic: XXX = group this (for all units in a group?)  (Read 844 times)

0 Members and 2 Guests are viewing this topic.

klavan

  • Guest
XXX = group this (for all units in a group?)
« on: 15 Dec 2004, 21:39:20 »
Hi all.
I've got a 4-men team and I want to group 'em. In the init field of the leader I type the XXX= group this (and that's OK). What I need to know is if I have to type the same command in the init field of each squad member or if is sufficient doing this only in the leader's one...
This dubt came up after the examine of a mission by toadlife (operation lojack).
Thanks in advance for any help! Bye.
« Last Edit: 15 Dec 2004, 21:39:34 by klavan »

Homefry31464

  • Guest
Re:XXX = group this (for all units in a group?)
« Reply #1 on: 15 Dec 2004, 21:41:40 »
Should work with just the commander of the group, for example I put this code in the leader's Init. field all the time....

grp = group this; "_x moveincargo helo" foreach units grp

So to answer your question, it just has to be in the leaders field only.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:XXX = group this (for all units in a group?)
« Reply #2 on: 15 Dec 2004, 21:46:55 »
doesn't even need to be the leader, just any group member

klavan

  • Guest
Re:XXX = group this (for all units in a group?)
« Reply #3 on: 15 Dec 2004, 22:04:10 »
Ok, I'm very happy to know that I don't have to paste about 200 time the same command in my mission.... :)
Thank you, guys!

Kilo11

  • Guest
Re:XXX = group this (for all units in a group?)
« Reply #4 on: 15 Dec 2004, 22:33:53 »
What command do you use to call that specific group up inside a script/trigger?

klavan

  • Guest
Re:XXX = group this (for all units in a group?)
« Reply #5 on: 15 Dec 2004, 23:02:07 »
What command do you use to call that specific group up inside a script/trigger?

It depends:
If you want to fire a trigger when the entire group is dead you have to type in the trigger's condition field:
count units grp == "not alive _x" count units grp
Where "grp" is the name of the group
I suggest you to take a look at the editors depot: it's an invaluable source of examples for this kind of problems.
Hope this help. ;)