Jump to content
johnnyboy

prevent AI from flanking

Recommended Posts

Hi guys.  I've created a long tunnel/cave using big rocks and castle ruins objects.  I want AI to move through cave and fight player and other AI aggressively.   I have waypoints moving them through cave, and when not in combat, they move through the cave no problem.  I am using formation DELTA and FILE, to funnel them through the cave.  I also have a constantly running loop to set there Behaviour from COMBAT to AWARE, to keep them from getting bogged down.  It works ok for some of the AI units, but not others.

 

PROBLEM:  Instead of moving through cave, some AI units choose to turn around and exit cave and find a path outside cave system to go around to other entrance of cave.  How do I prevent AI from flanking and choosing this alternate path?  I looked at Restriction Zones but don't think that will work. 

 

I'm hoping I can eliminate the alternate path somehow, so they will follow most direct (and dangerous) route dictated by their waypoints.   My fallback will be to code a script to advance them forward using doMove to defined positions, but that is a lot more work to achieve.

 

Any of you smart guys have an idea?

 

Also, is there a way to make AI maintain formation under fire?

Share this post


Link to post
Share on other sites

Simplest solution might be to just block the tunnel entrance.

Other than that you'd probably need to make the AI advance manually and disable respective features such as enableAttack etc.

 

Cheers

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
5 hours ago, Grumpy Old Man said:

Other than that you'd probably need to make the AI advance manually and disable respective features such as enableAttack etc.

You did it again Grump.  enableAttack solved my problem.  Units still moved forward fighting semi-aggressivley, but didn't break formation and exit the tunnel to flank.

 

Thank you sir!  You are the MAN!

 

5 hours ago, gc8 said:

This is just a guess but maybe some of the AI features could be disabled via https://community.bistudio.com/wiki/disableAI

Thanks for the suggestion gc8.   I was already trying many combinations of disableAI without getting the results I wanted.

  • Like 2

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

×