OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Egwal on 16 Oct 2002, 16:18:36
-
Ok. Ive got 2 groups of soliders with the name of ryhmä1 and ryhmä2 :-X. They're on safe mode and in a some sort of a line. And i need them to stay at the line and not goin to their leaders position. So is it somethin like ryhmä1 stop true or what?
And then how can i make them all salute at the same time without puttin sol1 playmove "EffectStandSalute"; sol2 "EffectStandSalute... etc.
-
Welcome to the forums, EgWal
Let me introduce you to a good friend of mine... the foreach command. (God... what sort of sad bastard has OFP editing commands for friends ;D)
Try this:
In the init field of your leader:
"dostop _x" foreach (units group this)
That will execute the dostop command for all units in the leader's group. Similarily, you can use it to salute:
"_x playmove ""effectstandsalute""" foreach (units group ryhmä1)
Note the double quotes. These are necessary to have a string (the "effectstandsalute" bit) inside another string (the "_x playmove.... " bit). Trust me, it looks stupid but there are no typo's in there ;)