OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: klavan 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.
-
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.
-
doesn't even need to be the leader, just any group member
-
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!
-
What command do you use to call that specific group up inside a script/trigger?
-
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. ;)