Jump to content
Sign in to follow this  
Need-To-Know

Make AI Pilot not react to enemies

Recommended Posts

I used to have a script for making a squad mate AI Helo pilot not react to enemy forces and just fly where I click on the map. Lost it now.

Also wishing for a way to order different flight or hove altitudes if that ever gets released. Someone did it in Arma 2 if memory serves me correctly.

Share this post


Link to post
Share on other sites

For the flight altitude, you can use 'this flyinHeight 500;' in a waypoint perhaps. That will make that vehicle fly at an altitude of 500m (or at least, try and get that high - with planes you have to give them enough room to be able to climb to that height before they get to the waypoint, otherwise they just start doing random turns etc and really annoying. Not sure that this applies to heli's though since they can potentially just hover in place till they get to that height)

You could also try 'this disableAI "FSM";' in the units init line and set the units behaviour to careless to get it to ignore everything. Then run your script to move it.

Share this post


Link to post
Share on other sites

Thanks for the suggestions I will give them a try.

For the pilot not to react - Seems the solution I found in the past took several lines in the units init. I had even created a mission file with just the pilot to keep up with it. But lost the drive when it crashed.

For flight height - In Arma2 or 1 someone created a way you could real time order the helicopter pilot to change altitude from high low. It helped when inserting troops to stay low and masked from SAMs. Or get to a location faster by staying high - out of small arms fire.

Share this post


Link to post
Share on other sites

Hi, you need to use allowfleeing and setbehaviour commands together

---------- Post added at 13:44 ---------- Previous post was at 13:43 ----------

Setbehaviour “carelessâ€

Share this post


Link to post
Share on other sites

Thanks - In testing this is what I have found works good:

Create myself and a pilot. In the Pilots init paste:

(driver this) setBehaviour "Careless"; (driver this) setCombatMode "Blue";

So far so good. Still not perfect but works better.

Thanks for the suggestions.

Share this post


Link to post
Share on other sites

Hey, there's a pretty straightforward BIS function for this - BIS_fnc_ambientFlyby:

/*

Author: Nelson Duarte

Description:

Spawns an ambient air unit, makes it move and deletes it when it reaches destination

Vehicle will never engage and will be flagged as captive

Good for simple creation of ambient fly by's

Parameter(s):

_this select 0: ARRAY - The position where vehicle will spawn

_this select 1: ARRAY - The end position of the vehicle, it will be deleted here

_this select 2: NUMBER - The spawn and flight height of the vehicle

_this select 3: STRING - The speed the vehicle will move ("LIMITED", "NORMAL", "FULL")

_this select 4: STRING - The classname of the vehicle to spawn

_this select 5: SIDE - The side the vehicle belongs

Returns:

BOOL - true on success

*/

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  

×