Jump to content
Sign in to follow this  
BEAKSBY

How to get AI in parachute to fly towards player?

Recommended Posts

Hi All,

I've tried doMove, Move and setting waypoints but the paratrooper in the air will not move towards the player that is moving on ground

{"B_soldier_PG_F" createUnit [_airPos, gunner_grp, "_newUnit=this", 0.5, "Corporal"];
	_newUnit setpos _airPos;
	waitUntil {(getPosATL _newUnit select 2) < 50};  // this does not work
	_newUnit action ["OpenParachute", _newUnit];
	while {(getPosATL _newUnit select 2) > 5} do { _newUnit move position player};

Share this post


Link to post
Share on other sites

Very interesting, this was working extremely well in arma2.

Halo insertions in Arma3 are lacking, to say the least.

You can't even reach horizontal speeds above 54km/h, in arma2 it was easily possible to reach authentic real life speeds.

Unfortunately this ticket of mine has been assigned but is still unresolved.

Just tried the same thing in arma 2, hell, even a parachuting squad will try to keep formation when floating towards their destination.

In arma3 they just circle until they land...

Not to mention that you needed to execute a specific halo script in arma2 to open AI parachutes, this is really weird.

Share this post


Link to post
Share on other sites

Try to teleport the unit just above the player ?

Share this post


Link to post
Share on other sites

If the AI simply won't comply, you can try a brute force solution using trig and vectors:

_newUnit allowDamage false;
while {!(isTouchingGround _newUnit)} do {
   _unitPos = getPosATL _newUnit;
   _playerPos = getPosATL player;
   _dirToPlayer = (((_playerPos select 1) - (_unitPos select 1)) atan2 ((_playerPos select 0) - (_unitPos select 0)));

   _newUnit setDir (90 -_dirToPlayer);
   _newUnit setVelocity [50 * (sin _dirToPlayer), 50 * (cos _dirToPlayer), -10];
   sleep 3;
};

_newUnit allowDamage true;

You can tweak the magnitude of the vector and the sleep duration to whatever looks best in-game. The allowDamage part is to prevent the AI from hitting the ground too hard and killing themselves.

I haven't tested this, so it might be possible to remove the setVelocity command entirely and still get good results.

Share this post


Link to post
Share on other sites

Thanks, I tried it but still didn't work?

I thought the doMove or command move would work in a parachute...it is a steerable type parachute afterall.

Share this post


Link to post
Share on other sites

use a move waypoint

"B_soldier_PG_F" createUnit [_airPos, gunner_grp, "_newUnit=this", 0.5, "Corporal"];
       _newUnit setpos _airPos;
_wp = gunner_grp addWaypoint [getpos player,0 ];
_wp setWaypointType "move";

Actually ignore that they seem to fly where they want.

They will fly North quite well but not South

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Having the same issues. ARMA 2 rocked the Halo/Haho. I was able to cover the whole map doing a very high HAHO. But in ARMA 3, it seems they hate Airborne troops.

My guys mostly just die in the air for no apparent reason, or explode when they are landing.

Share this post


Link to post
Share on other sites

I am creating a mission with my brother. We both have our own squads. But we're stuck. Basically, I want to fly him to a point, and have him and his men jump out with a parachute. Now we can do that. He has to go to each of his men and change their inventory. Removes their backpack and adds a parachute. Problem is, we also need them to all steer to and land in a certain area. They all kind of just go wherever they want...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×