TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

Improved support for AI Retreating of characters #4159

Open Tum1370 opened 1 year ago

Tum1370 commented 1 year ago

This does NOT work. The AI will just stand the and take all damage then die. SUGGESTION. We should have an options for RETREAT. We should be able to set at what percent HP we would like the AI to Retreat. We should have an option of Maximum distance the AI can retreat, and then how long to remain at the retreated distance before returning to its position / path. ( Or if the AI has Health regen, at what percent HP the AI health needs to be, before returning to its position / path.

EDIT : After testing RETREAT on a empty map, and the behaviour editor. I DO NOT see anything about retreat in the whole behaviour.

PLEASE UPDATE THIS OLD POST AS A BUG AS THIS IS BUGGED https://github.com/TheGameCreators/GameGuruRepo/issues/4026

davetgc commented 1 year ago

Ai work is planned before the release of V1, so I'll mark this as a bug and an enhancement

LeeBamberTGC commented 1 year ago

@Tum1370 Added logic when hurt character to run away a little when this flag is set: image

Tum1370 commented 1 year ago

@LeeBamberTGC ok thanks, I will test this when next exp build is available. does it have options like a percent chance of retreat, distance they will retreat etc, or how long they remain retreated for before starting fight again?

You don’t really want every ai just running away after taking any amount of damage etc

LeeBamberTGC commented 1 year ago

@Tum1370 Once the fix is confirmed, we can retag this as a feature request and cover the kind of nuances we want to see. Ultimately users should be able to built out their own character attack logic, the stock ones should be a basic working version from which other users can expand. More on this when bugs are out the way and we can look at how AI can be crafted in 2024.

Tum1370 commented 1 year ago

@LeeBamberTGC After a very quick test, i placed about 5 AI, all had the retreat option. Gave myself a Assault Rifle, and started shooting them, I was noticing that sometimes they were retreating a few feet back, then turning, and starting combat again. I suppose, that is the fix of this bug, without thinking about any feature requests ?

Tum1370 commented 1 year ago

Maybe simple additional options would be the following. All of these options would need a percentage setting so they are random.

  1. How far they can retreat.
  2. What percentage health they retreat.
  3. Do they take cover when they retreat.
  4. How long they stay out of combat before re engaging.

When i think of more options i will add them for you .