OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: LimeCordial on 07 Sep 2002, 11:56:31

Title: moveincargo for squad
Post 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. :-[
Title: Re:moveincargo for squad
Post by: Gameer_77 on 07 Sep 2002, 12:03:07
discostu = group this; "_x moveincargo boat3" foreach units discostu

Tsk, tsk, tsk...  ::)

 8)PEACE
Title: Re:moveincargo for squad
Post by: KTottE on 07 Sep 2002, 12:08:54
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
Title: Re:moveincargo for squad
Post by: LimeCordial on 07 Sep 2002, 12:12:24
discostu = group this; "_x moveincargo boat3" foreach units discostu

Tsk, tsk, tsk...  ::)

 8)PEACE

lol.

thanks for the help.