Home   Help Search Login Register  

Author Topic: Problem with AI when forced to Eject from helo  (Read 1486 times)

0 Members and 1 Guest are viewing this topic.

Offline Odin

  • Members
  • *
Problem with AI when forced to Eject from helo
« 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

Code: [Select]
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
Code: [Select]
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

Offline epsilonsun

  • Members
  • *
Re: Problem with AI when forced to Eject from helo
« Reply #1 on: 02 Sep 2008, 02:49:15 »
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

Offline Odin

  • Members
  • *
Re: Problem with AI when forced to Eject from helo
« Reply #2 on: 02 Sep 2008, 09:45:15 »
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
 
 

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Problem with AI when forced to Eject from helo
« Reply #3 on: 02 Sep 2008, 10:03:40 »
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.
"When 900 years YOU reach, look as good you will not!"

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Problem with AI when forced to Eject from helo
« Reply #4 on: 02 Sep 2008, 11:38:39 »
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 last week.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Problem with AI when forced to Eject from helo
« Reply #5 on: 02 Sep 2008, 12:40:53 »
For the delay:
Code: [Select]
{_x action ["EJECT",vehicle _x]; unassignVehicle _x; sleep 0.6} foreach units _group;
« Last Edit: 02 Sep 2008, 16:50:00 by Spooner »

Offline Odin

  • Members
  • *
Re: Problem with AI when forced to Eject from helo
« Reply #6 on: 04 Sep 2008, 14:31:09 »
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