OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Odin on 02 Sep 2008, 02:26:14
-
G'day, I have a wee problem with my AI guys when the a forcibly ejected from a Helo, The problem is when they jump they go through the animation of parachuting but fall to their death while empty chutes float gently to the ground.
I have the chopper set at a flyinheight of 150.
In the trigger I have this
nil = [] spawn {{{_x action ["EJECT",vehicle _x]; sleep 0.6; unassignVehicle _x} forEach units _x}forEach [unit1_1,unit2_1,sf1,unit4_1];};
My player is also ejected via a WP just beyond the trigger with this string
player action ["eject",mh6_1]
My player stays in his chute and lands safely.
Could the flyinHeight be to low?
Or could the sleep 0.6 be the factor?
Any help appreciated
Cheers
Odin
-
Hi,there,
you'd better try this.
A01 action ["eject", CH47x]
unAssignVehicle A01
~1
A02 action ["eject", CH47x]
unAssignVehicle A02
~1
or this.
but,a little danger.
{"EJECT",vehicle _x} foreach units _group
{unAssignVehicle _x} foreach units _group
-
Thx epsilonsun, The 1st way that you posted works great. I originaly used that method, but really wanted to call it via a trigger, the second way you state really is a danger, I don't know how no one gets concussion :D
as for now I will go back to the scripted way you suggested :good:
So if any one knows why the AI don't move into their chutes with the inital code I posted could you please let me know, for intrest's sake.
Thanx
Odin
-
I have a theory. It lies here:
{_x action ["EJECT",vehicle _x]; sleep 0.6; unassignVehicle _x}
Essentially, a parachute is also a vehicle. So what you're doing is first ordering everyone to eject (at once), upon which you wait half a second, which is plenty of time for them to get inside their NEW vehicles, the parachutes, which they are then ordered to exit right away! So that might be your problem.
However, using forEach is not the best here either, since it means everyone jumps out at the same time, meaning they often knock into each other, killing each other/wrecking the chute. That's why having a proper parajump script is the best, with a slight delay between each jump. :)
Good luck!
Wolfrug out.
-
There is a delay between each jump. That is what the sleep is for ;P
If this issue is only happening in MP, then refer to what Killswitch said about it (http://www.ofpec.com/forum/index.php?topic=31951.msg220079#msg220079) last week.
-
For the delay:
{_x action ["EJECT",vehicle _x]; unassignVehicle _x; sleep 0.6} foreach units _group;
-
Excellent Thanx for the help all, Got it going sweet now :cool2:
Yeah it turned out to be the sleep factor making the AI crash into one another and fall from their chutes :scratch:
Cheers
Odin