Jump to content
phatpuke

AI weird interaction if player is close

Recommended Posts

Encountered this weird issue and no idea if there is any possible way around this without doing CaptureUnit.

Disabled numerous AI functions, made the player invisable, setcaptive pretty much everything I can think of but the AI will still do this if a player is close. If i place another AI at the players position and then view it through the camera, The AI is acting exactly how it should.

Any idea's?
 

 

Share this post


Link to post
Share on other sites

This is one additional weird Ai behavior among the many.

 

For example I discovered that if you add a damagedEH to the Ai units (_unit addEventHandler ["Dammaged") and then check the "_selection" any damage that the ai receives fires a "head", "face" or "neck" _selection even if you shoot at the Ai's legs, arms, body etc.

 

Too bad that most of these issues will probably remain unfixed...

  • Like 2

Share this post


Link to post
Share on other sites

As a quick test, check the AI's targetKnowledge and knowsAbout of the player on init. Then replace player with an AI and do same check... if player is immediately known but AI isn't, try making the AI forget the target basically on init and see if that helps. Could also increase the player's camouflageCoef via setUnitTrait maybe?

  • Like 1

Share this post


Link to post
Share on other sites

A AI unit and player are both know by the patrol AI, if you set the camouflageCoef to 0 (or even 0.0001) AI still does this.

Share this post


Link to post
Share on other sites

Hmm... the reason why I ask is because, worst case scenario, it's the pathing and it can't be fixed. A better case scenario is the behavior of the AI is just bad. You said you've tested disabling some AI features, but just for science, disable all features except for:

   1. "move"

   2. "path"

   3. "anim"

   4. "teamSwitch" (Some reason needs to be enabled)

 

If the AI still messes up, even after making the player setCaptive, its the pathing. If not, its the AI behavior and you probably just have to disable "autoCombat" and "FSM" ai features, maybe a couple others. At least to start.

  • Like 1

Share this post


Link to post
Share on other sites

Gone through every single possible option. My guess is the engine interracts with players completely different to how it interfacts with other AI. 'Arma Life'

Share this post


Link to post
Share on other sites

Have you tried _Bob allowFleeing false? Also setAiSkill ["courage",1] on top of that. Doubt it'll fix it but I'm running out of ideas lol.

 

Can also place physical objects like Can Openers to prevent AI from pathing by it. (Totally not @genesis92x's idea)

  • Like 1

Share this post


Link to post
Share on other sites

sadly none of these work. Even if i set it as 

this forceWalk true; level1_unit1 disableAi "checkVisible"; level1_unit1  allowFleeing 0; level1_unit1 setSkill ["courage",1];

 

Share this post


Link to post
Share on other sites

You've probably tried this, but I didn't see it mentioned above.  this setBehaviour "CARELESS";    Tried that?

Share this post


Link to post
Share on other sites
3 hours ago, johnnyboy said:

You've probably tried this, but I didn't see it mentioned above.  this setBehaviour "CARELESS";    Tried that?

If careless is on it goes to whole new level of weird and just walk through the floor/wall haha

  • Haha 3

Share this post


Link to post
Share on other sites

Yeah! I love that way of K arma! Never mind the b.ox!

  • Like 1

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

×