Home   Help Search Login Register  

Author Topic: Paratroopers chasing their aircraft  (Read 1034 times)

0 Members and 1 Guest are viewing this topic.

Crassus

  • Guest
Paratroopers chasing their aircraft
« on: 02 Feb 2004, 05:45:25 »
The following is the code to get one stick of jumpers out of an An-124. They exit fine, but when they hit the drop zone they chase after their assigned aircraft.

As you can see, I attempted to "lock" the bird, though this didn't work; the paratroopers still chase their plane. (I also tried destroying the bird after it had flown out of the area of the DZ, to no avail.)

I'm hoping someone knows how I can get them to stop chasing the bird, sometimes right into the ocean.  ::)

Code: [Select]
"unassignVehicle _x" forEach stick1

_jumpers = stick1
_a = 0
_b = count _jumpers

#Go
(_jumpers select _a) action ["EJECT", condor]
unassignVehicle (_jumpers select _a)
_a = _a + 1
~.1
? _b > _a: goto "Go"

condor lock true

CrashnBurn

  • Guest
Re:Paratroopers chasing their aircraft
« Reply #1 on: 02 Feb 2004, 18:51:03 »
"unassignVehicle _x" forEach stick1  <-- MOVE THIS LINE

_jumpers = units stick1 <-- CHANGE THIS
_a = 0
_b = count _jumpers

#Go
(_jumpers select _a) action ["EJECT", condor]
unassignVehicle (_jumpers select _a)
_a = _a + 1
~.1
? _b > _a: goto "Go"

"unassignVehicle _x" forEach _jumpers <-- DOWN TO HERE

condor lock true <-- DELETE THIS LINE

exit  <--ADD THIS (IF YOUR SCRIPT IS FINISHED)

By unassigning them before they eject, you're basically giving them a GET OUT waypoint, probably at the airfield,  ::) since they're in a plane. Even tho you eject them, they still want to complete their get out order. Unassign them individually as you already do, then at the end just for insurance you can do the group.
« Last Edit: 02 Feb 2004, 19:23:48 by CrashnBurn »

Crassus

  • Guest
Re:Paratroopers chasing their aircraft
« Reply #2 on: 02 Feb 2004, 21:01:33 »
Code: [Select]
_jumpers = units stick1 <-- CHANGE THIS
I don't think I would change this as you recommend, would I.  stick1 is an array (?) of six (6) groups.

Code: [Select]
stick1 = []
...

stick1 = units squad1 + units squad1A + units squad1B + units squad2 + units squad2A + units squad3A

...


"_x moveInCargo condor" forEach stick1
 

Crassus

  • Guest
Re:Paratroopers chasing their aircraft
« Reply #3 on: 02 Feb 2004, 21:25:16 »
Yeah, just tested it.

Code: [Select]
_jumpers = units stick1
The script wants an array; using _jumpers = units stick1 causes an error.

But putting "unassignVehicle _x" forEach _jumpers  after the eject loop did the trick; they're not chasing the A/C.

Thanks very much.  8)  
« Last Edit: 02 Feb 2004, 21:31:21 by Crassus »