OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: LimeCordial on 07 Sep 2002, 11:56:31
-
i really should know this by now, but i don't, so....
what is the command to moveincargo a whole squad? that is, instead of typing 'this moveincargo NAME' in the init fields of all the members. :-[
-
discostu = group this; "_x moveincargo boat3" foreach units discostu
Tsk, tsk, tsk... ::)
8)PEACE
-
Why write more code than necessary?
"_X moveInCargo NAME" forEach units this
That's all you need. A group is by defenition named after the leader. If the leader of a group has Alpha in his Name field, the group will be called Alpha. At least when refering to it in a script, or init spell.
And using "this" will do the work as well. I know this works since it is how I always do it.
Cheers, KTottE
-
discostu = group this; "_x moveincargo boat3" foreach units discostu
Tsk, tsk, tsk... ::)
8)PEACE
lol.
thanks for the help.