Home   Help Search Login Register  

Author Topic: AI Para Drop?  (Read 2152 times)

0 Members and 1 Guest are viewing this topic.

Offline ckclaw

  • Members
  • *
AI Para Drop?
« on: 02 Aug 2008, 19:42:30 »
Hi guys,

I looked about but found nothing,there probably is but just missed it?

Does anyone know how to get an AI squad to Para drop out of a chopper,say when it hits a trigger?

Thanks in advance!  :)

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: AI Para Drop?
« Reply #1 on: 02 Aug 2008, 22:28:55 »
I think you can do it when you hit a waypoint and that might be more useful. Still, for a trigger, you could group the trigger with the chopper and then in the trigger:
OnAct: nil = [] spawn { { if (((assignedVehicleRole _x) select 0) == "Cargo" ) then { _x action ["EJECT", vehicle _x]; sleep 0.5 }; } forEach (crew (thisList select 0)); };

(I assumed you wanted just the passengers for a paradrop, not the pilot/gunners).

In a waypoint, you would use:
OnAct: nil = [] spawn { { if (((assignedVehicleRole _x) select 0) == "Cargo" ) then { _x action ["EJECT", vehicle _x]; sleep 0.5 }; } forEach (crew (vehicle this));};
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline ckclaw

  • Members
  • *
Re: AI Para Drop?
« Reply #2 on: 03 Aug 2008, 13:48:17 »
Had a quick try last night on the last option but no luck!

Although i was rat arsed!  :D

So ill try em again in a bit!

Thanks for help!  :good:

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: AI Para Drop?
« Reply #3 on: 03 Aug 2008, 14:12:57 »
I did test that waypoint version before posting it, and it worked fine in a MOVE waypoint. Just retested and it was fine. I'd suggest having more than a 0.5s delay between jumps though ("sleep 1.5" looked best for me).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline ckclaw

  • Members
  • *
Re: AI Para Drop?
« Reply #4 on: 03 Aug 2008, 16:20:49 »
Nah still cant get it to work!

Have a mi-17 full of troops,they move to a waypoint then to the next(which has the code in 'on act')

Still no joy!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: AI Para Drop?
« Reply #5 on: 03 Aug 2008, 17:37:51 »
Well, I can't persuade the code not to work, so I have no idea what you are doing wrong. I did forget one thing though, which was to unassign the parajumpers from the vehicle (otherwise they will run after the helo and try to get back in again - oops):

Waypoint On Act: nil = [] spawn { { if (((assignedVehicleRole _x) select 0) == "Cargo" ) then { _x action ["EJECT", vehicle _x]; unassignVehicle _x; sleep 1 }; } forEach (crew (vehicle this));};

Quote from: ckclaw
I looked about but found nothing,there probably is but just missed it?
Or just try searching on the forum for "paradrop" and find about 100 other examples of how to do this ;P
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline ckclaw

  • Members
  • *
Re: AI Para Drop?
« Reply #6 on: 03 Aug 2008, 18:42:12 »
The mi-17 is on the ground with 9 troops's init is 'this moveincargo heli1'

Do they have to be Para's?

Could it be helo not high enough?

sorry for not being able to test,im about to shoot me kids!  :D

EDIT:-


YAY Now kids in bed had time to test properly!

Don't ask me why but your first method works a charm!
Still cant get the waypoint one to work but trigger verson does!  :good:

Thanks for the advice/patience!  :clap:
« Last Edit: 03 Aug 2008, 20:17:37 by ckclaw »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: AI Para Drop?
« Reply #7 on: 03 Aug 2008, 20:57:44 »
Parajumps should work (100% survival) above 60m or so. Has to be very low before you don't even see the parachute, but eject will push them out regardless of height. You will need to "unassignVehicle _x;" in the trigger version, as shown on the last waypoint version, otherwise they'll run after the chopper to get back in, rather than following their own waypoints. Still no idea why the waypoint version isn't working for you... ???
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)