Jump to content
Sign in to follow this  
Guest

AI Unit will not fire on an enemy when in "MIDDLE" stance - Arma 3 Tracker Topic

Recommended Posts

Guest

Arma 3 Tracker Topic Link

As the title describes, I have found conditions where AI units will not target nor fire on enemies in sight while in "MIDDLE" stance, and changing stance to "UP" or "DOWN" and then testing the same scenario reveals the units all of the sudden behaving as normal, firing on enemies as they should. I have tested this probably 20 times, it happened every time when the AI unit is in "MIDDLE" stance. This issue is found in both the current Standard Arma 3 version and the Arma 3 Development version.

There is a downloadable test mission provided with the Tracker Topic.

In the mission, just wait a few seconds for the Opfor unit nearby to go into crouch stance, and then hit him in the leg, or hit nearby him, or run out into his view - as long as you are more than 20 meters out - any of these actions will reveal the issue, as the unit will just sit there and stare at the player, and will not target (lift weapon) nor fire. I have tested this out to 150 meters with the same results. The only time I have gotten the unit to fire is when I came within 10 meters of him, where he stands up and then fires.

If attempting to re-produce the issue in ones own mission, just set a lone enemy units init code to: This setBehaviour "SAFE"; This setUnitPos "MIDDLE"; And then set the player unit 50 meters away, and be sure initially that the enemy unit is not facing the player, so that when the test is started the enemy unit does not know about the player. Then from there, do the same as what the description at the top says for the provided test mission.

I don't know if this issue has existed for some time, or just cropped up, but I personally see it as a major issue that can affect both AI overhaul mods and missions.

Arma 3 Tracker Topic Link

Share this post


Link to post
Share on other sites

I noticed that the new "Heavy Gunner" -characters will never fire on enemies. I thought this was a separate issue, but perhaps not?

Share this post


Link to post
Share on other sites
Guest

F2k Sel's method that is posted in the Tracker Topic I can confirm works for initially placing units in the game that are set to be in Middle stance:

null=this spawn {sleep 0.01;_this setUnitPos "middle";_this setBehaviour "safe";};

Unfortunately, after a lot of testing, it seems there are still some big issues with units bugging out and not firing on enemies when setting units to MIDDLE stance after any significant delay in game while a unit is in safe mode:

Using Middle position after a significant delay with SAFE Mode does NOT work (Unit will not fire on enemy):

null=this spawn {sleep 0.01;_this setBehaviour "SAFE";Sleep 10;_This SetUnitPos "MIDDLE";};

With no micro second inital delay makes no difference in result when the stance is executed after a significant time:

This setBehaviour "SAFE";null=this spawn {Sleep 10;_This SetUnitPos "MIDDLE";};

Using Middle position after a significant delay with AWARE Mode does work:

null=this spawn {sleep 0.01;_this setBehaviour "AWARE";Sleep 10;_This SetUnitPos "MIDDLE";};

With no micro second inital delay makes no difference in result when the stance is executed after a significant time:

This setBehaviour "AWARE";null=this spawn {Sleep 10;_This SetUnitPos "MIDDLE";};

At this point it seems clear that the combination of SAFE mode and MIDDLE stance is causing the issue, and further tests reveal that SAFE mode set in advance can set the stage for constant AI threat response failure in MIDDLE stance when it is set later on due to various combat situations.

More tests:

Does not work:

This setBehaviour "SAFE";null=this spawn {Sleep 10;_This SetBehaviour "COMBAT";_This SetUnitPos "MIDDLE";};

Does not work:

This setBehaviour "SAFE";null=this spawn {Sleep 10;_This SetBehaviour "AWARE";_This SetUnitPos "MIDDLE";};

With inital micro delay before setting SAFE mode. Does not work:

null=this spawn {Sleep 0.01; _This SetBehaviour "SAFE";Sleep 10;_This SetBehaviour "AWARE";_This SetUnitPos "MIDDLE";};

1.0 delay before Middle stance After Behaviour change randomly works and fails to allow unit to respond to threats.

This setBehaviour "SAFE";null=this spawn {Sleep 10;_This SetBehaviour "AWARE";Sleep 1.0;_This SetUnitPos "MIDDLE";};

5.0 delay before Middle stance After Behaviour change works every time. It seems this works because the unit has enough time to completely process/accept going into the new behaviour before the stance switch.

This setBehaviour "SAFE";null=this spawn {Sleep 10;_This SetBehaviour "AWARE";Sleep 5.0;_This SetUnitPos "MIDDLE";};

Ran same tests with setting combat mode before stance change, same results.

Tried an inital micro delay before setting SAFE, same results:

null=this spawn {Sleep 0.01; _This SetBehaviour "SAFE";Sleep 10;_This SetBehaviour "AWARE";Sleep 1.0;_This SetUnitPos "MIDDLE";};

_______________________________________________________________________________________

Conclusion:

With the unit in SAFE mode, and then after any significant delay, switching stance directly to MIDDLE while he is still in SAFE mode causes him to not fire on a visually identified enemy. Manually setting a behaviour change to Aware or combat before switching stance to middle will *NOT* fix this unless a significant delay is set before changing the stance, meaning the main purpose of setting stance to middle in reaction to a combat situation is far too slow to work.

So, right now I do not see a reasonable fix for this, except for that hopefully the developers will fix this at some point.

This means that this can happen in any mission where units in safe mode are scripted to go into middle stance, regardless of them being set to Aware or Combat behavior immediately before the stance change unless a lengthy and unusable delay is set.

Examples : Units initially in safe mode that are scripted to take cover, using middle stance. Units initially in safe mode that are scripted to respond to some sort of base alert that sends them into middle stance. Patrols that are initially in safe mode that are scripted to go into middle stance due to combat conditions.

Testing has also revealed these bugged units do not recover from it (regardless of what behavior setting they end up in), they will not fire on a nearby sighted enemy unless the enemy gets very close to them or their stance is changed manually.

/Edit

I have just discovered that this bug can happen to AI units in safe mode that go into middle stance through their own AI, so this issue is not just limited to scripted stance switch to Middle. The issue here is randomly reproducible due to random behavior from the AI, but I am able to get it to happen roughly 20% of the time by just planting an opfor unit nearby the player, in safe mode, facing away from the player, and then fire off a shot into the air (let the sound of the shot alert the unit) and let the unit respond shortly after.

Edited by Guest

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  

×