Jump to content
Sign in to follow this  
Yuval

AI Helo won't attack?

Recommended Posts

I'm trying to make an AI Kajman Heli attack the player, while the player gets into a Tank.

 

The heli's are 4km~ away and they are revealing, targeting and watching the player. I made a waitUntil to make sure the helis will only start firing (doFire) when their distance from the player is below 500m.

 

Thing is, once the player gets into the tank - no matter where they are they just stop. This is the script I use to make them attack:

_object = _this select 0; // The heli
_target = _this select 1; // The player
_fireDistance = _this select 2; // 500
_approachSpeed = _this select 3; // 300
_approachHeight = _this select 4; // 100
 
_units = (crew _object);
 
{
    _unit = _x;
    _unit reveal [_target, 4];
    _unit doWatch _target; 
    _unit doTarget _target;
    _unit forceSpeed _approachSpeed; 
    _unit flyInHeight _approachHeight;
    _unit allowFleeing 0;
 
    [_unit, _target, _fireDistance] spawn {
 
        waitUntil { (((_this select 0) distance (_this select 1)) <= (_this select 2)) };
        (_this select 0) doFire (_this select 1);
    };
}forEach _units;

Edit: I just ran another check, even if the choppers are close and they already started shooting me - the moment I get into the tank they go into some weird auto-hover on and stop shooting - just stand there. WHY?

Share this post


Link to post
Share on other sites

Any video footage of this or a repro mission you're testing?

Share this post


Link to post
Share on other sites

Any video footage of this or a repro mission you're testing?

deleted.

Nevermind, it's just impossible for the heli's to attack ANYONE inside a vehicle for some reason.

 

It's hard for me to get footage. It's just the moment the player gets into a vehicle - the heli's get into an auto-hover on and don't fire

Share this post


Link to post
Share on other sites

Have you tried using (vehicle _target) instead of just _target? It might be that you can't target an individual crew member of a vehicle. 

Share this post


Link to post
Share on other sites

Have you tried using (vehicle _target) instead of just _target? It might be that you can't target an individual crew member of a vehicle. 

Yeah, that was my initial idea - but the helis won't move at all if I do so.

 

I honestly gave up, and I removed the heli's part from my mission

Share this post


Link to post
Share on other sites

I know you gave up, but this seems excessively complex. You should just be able to assign a way point to the helicopter itself (not it's crew) at the players vehicle and it will handle the rest.

Arma is often smarter then people give it credit. When scripting, try the simplest solutions first.

Share this post


Link to post
Share on other sites

I've got another problem since 1.56 with the standard hellcat.

It doesn't attack any unit, no matter if the enemy is infantry, vehicle or another heli.

I tried in vanilla on an empty airfield:

Several CSAT enemies (infantry team, ifrit) on the ground and Orca in the air.

Hellcat pilots with max skill and wp seek&destroy (openfire&aware)

The hellcat comes from 1000m away and when the enemies are revealed - it stops and hovers till it's shot down!?

When there are backdoor gunners, they try to engage, but the pilot never tries to use the main weapons of the heli.

I tried this in several terrains with different factions:

Hellcat-Pilots as Bluetooth, ground units as CSAT - Same result!

When the heli is a Littlebird, all works as in former versions:

The heli reveals the enemies itself, flies away, turns around and attacks with minigun and rockets.

The hellcat did the same in a self made mission before 1.56.

Now It seems that it doesn't 'want' to engage and cancels any attack and the seek&destroy - movement.

The only way to force an attack is with some step-by-step commands like...

reveal, dowatch, dotarget, dofire... in a script, but this is absurd!

When I board a vehicle, the hellcat aborts the attack and falls back in 'do-nothing-routine' without any attack.

We tried this on another pc with a different account (same version) - same result.

I've got no idea why only the hellcat acts so strange and why bi has changed this ai behaviour?

Does anyone notice this 'bug' and has anyone an idea what we can do to bring back the former behaviour?

I'm new here and hope that someone can help me out, to finish my mission.

THANKS VERY MUCH!

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  

×