Home   Help Search Login Register  

Author Topic: How to unassign a whole group?  (Read 486 times)

0 Members and 1 Guest are viewing this topic.

Offline Crazy_Ivan

  • Members
  • *
How to unassign a whole group?
« on: 20 Jun 2003, 17:39:14 »
I need help I'm trying to make a script thats ejects a group from a truck.
The ejection part works fine but i can't unnasign the group from the vehicle.
They just climb back into the vehicle again.


The script

_grp = A_sqd
_vehicle = truck

 
_aunits = units _grp
_i = 0
_j = count _aunits

#Eject
 (_aunits select _i) action ["EJECT",_vehicle]
 UnassignVehicle (_anuits select _i)
 _i=_i+1
 ~0.3
?_j>_i:goto "Eject"

exit
« Last Edit: 20 Jun 2003, 17:48:50 by Crazy_Ivan »
Teamwork is essential; it gives the enemy other people to shoot at.

borrowed soap

  • Guest
Re:How to unassign a whole group?
« Reply #1 on: 20 Jun 2003, 17:54:48 »
not sure, but would this work:
"unassignVehicle _x" forEach A_sqd

Iwesshome

  • Guest
Re:How to unassign a whole group?
« Reply #2 on: 20 Jun 2003, 17:57:13 »
Crazy_Ivan,

Check out this post... It deals with a plane but answers what you are looking for and just apply it to your vehicle.

http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=7848;start=15

Offline Crazy_Ivan

  • Members
  • *
Re:How to unassign a whole group?
« Reply #3 on: 20 Jun 2003, 18:04:37 »
Thanks that helped, it works perfectly now. :) :)
Teamwork is essential; it gives the enemy other people to shoot at.