Home   Help Search Login Register  

Author Topic: Question about ejecting units  (Read 1328 times)

0 Members and 1 Guest are viewing this topic.

Offline MythPro1

  • Members
  • *
  • That is not your daddy's shotgun, Cowboy!!!
Question about ejecting units
« on: 27 Sep 2002, 00:34:29 »
How do i set up a certain trigger to have a group of units bail out of a chopper in mid-air?

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Question about ejecting units
« Reply #1 on: 27 Sep 2002, 00:36:02 »
Check out the editors depot for ejection scripts and other fancy scripts.

Offline MythPro1

  • Members
  • *
  • That is not your daddy's shotgun, Cowboy!!!
Re:Question about ejecting units
« Reply #2 on: 27 Sep 2002, 05:31:43 »
I used the eject script for choppers but if i'm not the group leader he orders everybody back into the chopper. How do i make him not do this because i want multiple choppers ejecting troops? ???

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Question about ejecting units
« Reply #3 on: 27 Sep 2002, 05:42:40 »
Thats because the leader still thinks he is assigned to the chopper.

UnassignVehicle UnitName

Is the command you are looking for.  You can use it a number of ways.  Either in a trigger, WP or at the end of your ejection script.

You can either name each unit in the group a name and use the command however many times for each of the units in the group, or you can name the group (put;  GroupName = Group This    in the init of the leader) and use;

"UnassignVehicle _X" foreach units GroupName

Offline MythPro1

  • Members
  • *
  • That is not your daddy's shotgun, Cowboy!!!
Re:Question about ejecting units
« Reply #4 on: 27 Sep 2002, 17:20:40 »
Ok so what i figured i could do is after the script file has been typed i could type in the same WP: ;mygrp = group this; "unassignvehicle_x" foreach units mygrp ???
Would that do it?

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Question about ejecting units
« Reply #5 on: 28 Sep 2002, 14:53:57 »
Well, it should be possible to read all about it in the FAQ section, m8  :) but if it ain't, do this:


Name the grp.Leader BOB. Then name the chopper Bird1, right?!  :D
And in Bob's INIT field, put :

 "_x moveinCargo Bird1" foreach units this

And when they're supposed to bail, use this code in a WP or Trigger :

[Bob] exec "Bail.sqs"

And here's a copy of the most used bail scroll :

---------------------------------------------------

_aunits = units Bob
_i = 0
_j = count _aunits

#BailBoys

(_aunits select _i) action ["EJECT", Bird1]
unassignvehicle (_aunits select _i)
_i=_i+1
~0.75
?_j>_i:goto "BailBoys"

exit
----------------------------------------------------

The script will automatically unassing all the paratroopers.
And the next group leader, well... just name him Rob, make a new scroll,
change the names to Bird2 etc.  

Should do it, m8  :-*