Home   Help Search Login Register  

Author Topic: Whats that command?  (Read 593 times)

0 Members and 2 Guests are viewing this topic.

Faculty

  • Guest
Whats that command?
« on: 02 Dec 2002, 20:12:23 »
Hey i have a mission where i have a chopper going back and though fropping off men.
Im using the < mygrp = group this; "_x moveincargo t2" foreach units mygrp > to make a group of men start in the chopper.
so the chopper goes off and drops off the men at the waypoint and returns to pick up more men where im forced to use this command:

<m1 moveincargo c1_1; m3 moveincargo c1_1; m2 moveincargo c1_1;  m2 moveincargo c1_1; m3 moveincargo c1_1; m4 moveincargo c1_1; m5 moveincargo c1_1; m6 moveincargo c1_1; m7 moveincargo c1_1; m8 moveincargo c1_1; m9 moveincargo c1_1; m10 moveincargo c1_1; m11 moveincargo c1_1; m12 moveincargo c1_1>

Which u can imagin e is extreamly annoying having the name each indavidual soldier.

So is there any command like

< mygrp = group this; "_x moveincargo t2" foreach units mygrp > command that will save me all this trouble  ???

      thanx  
                              Faculty

Kaliyuga

  • Guest
Re:Whats that command?
« Reply #1 on: 02 Dec 2002, 22:32:31 »
How about....  
[groupname,vehiclename] exec "getin.sqs"
*******************************************
_grp = _this select 0
_vehicle = _this select 1

_aunits = units _grp
_i = 0
_j = count _aunits

#Here
(_aunits select _i) moveincargo vehiclename
_i=_i+1
~1.4
?_j>_i:goto "Here"
exit


 then name your group "guys"  by putting:

guys = group this
 
in the init field of the group leader ;)

« Last Edit: 02 Dec 2002, 22:35:02 by Kaliyuga »

Faculty

  • Guest
Re:Whats that command?
« Reply #2 on: 02 Dec 2002, 23:03:08 »
Lovely thankyou very much :-D