OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: ckclaw 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! :)
-
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));};
-
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:
-
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).
-
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!
-
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));};
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
-
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:
-
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... ???