Posted April 08, 2019 by InOmS
#Part3 #AI
I wanted to implement a free flow like combat system (Yes... I didn't foresee the complexity of such systems...).
To do that, I put in place two entities :
The main idea was to make enemies take turns.
I implemented a timer with a random limit (from .3 to 1.2 secs) that triggers one of the enemies action.
This system helped a lot with the messy "all hitting together melee combat" I got when enemies were alone.
So we have 4 states for enemies:
The enemies movements are handled by Unity build-in navmesh system . This makes harder the fact to avoid the feeling of the AI gliding on the floor because I don't use root motion here and animation speed can be a little off sync with actual movement.