Home   Help Search Login Register  

Author Topic: EJECT AND UNASSIGN GROUP  (Read 962 times)

0 Members and 1 Guest are viewing this topic.

Offline OrnelP

  • Members
  • *
  • "The true battlefield is within"
EJECT AND UNASSIGN GROUP
« on: 16 Nov 2005, 04:28:22 »
 ??? I read the comref and have 3 versions of them but none seem to help me.  i have an airplane carrying a standard BIS soldier group and want them to EJECT from plane to simulate a Paradrop, i do not know how to script but i have improvised using Init fields.

Syntax.

{_x action ["eject", plane]} foreach units group sanders
now this works they eject, but as soon as they land, the leader begins telling everyone to get back into the plane. so i put this, but does not work.

Unassign Sanders, then sanders is the only one to be unassigned. But i know there is a way to make the whole group named g1 but i have failed to make it succesful.  

Group1 = Group this  ? no idea how please help
War is delightful to those who have had no experience of it
- Deciderius Erasmus

Offline OrnelP

  • Members
  • *
  • "The true battlefield is within"
Re:EJECT AND UNASSIGN GROUP
« Reply #1 on: 16 Nov 2005, 04:29:26 »
Also i do not want to use an existing script or mission, i know they exist but they are to difficult for my noobizm.
War is delightful to those who have had no experience of it
- Deciderius Erasmus

Offline Pilot

  • Contributing Member
  • **
Re:EJECT AND UNASSIGN GROUP
« Reply #2 on: 16 Nov 2005, 04:46:51 »
This should do it:
{unassignvehicle _x} foreach units group sanders

-Pilot

Offline OrnelP

  • Members
  • *
  • "The true battlefield is within"
Re:EJECT AND UNASSIGN GROUP
« Reply #3 on: 16 Nov 2005, 07:51:42 »
i will have to see if that works, but i dont understand how it will, by the way, what does the _X mean? and would it work for multiple airplanes?

eg {unassignvehicle _x} foreach units group sanders

{unassignvehicle _x} foreach units group randall

? is it the current airplane they are in?

what about the group question how do i organize a group

foreach units sanders group this?



War is delightful to those who have had no experience of it
- Deciderius Erasmus

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:EJECT AND UNASSIGN GROUP
« Reply #4 on: 16 Nov 2005, 09:43:36 »
In the init field of the group leader write

sanders = group this

Regarding _x, somebody will doubtless be along soon to to write an accurate but largely incomprehensible essay on the scope of variables.   The point is that "_x ... forEach ..." means 'carry out the same command on each unit'.    In other words, _x stands for each unit in turn.

The aircraft doesn't come in to it directly - the command will eject the loons from whatever vehicle they happen to be in.

When the loons eject, they are still assigned to the vehicle.   That's why you need the unAssign command as well as the eject command.    

Plenty of reviewed ArmA missions for you to play