Attack Randomization

Hello,

I am using a modified version of AgentNolan's Behavior Tree. I am looking for a way to make the attack AI more natural by introducing some randomness, namely the following main attack segment:

1545700175516.png

I intend to make the AI character strike, then walk back maybe 1-2 units, wait a random amount of time, come in and attack again. What is your suggestion on how to make the character move back 1-2 units away from the player character (2.5D game)? It is not possible to set up a waypoint since the location of the player is not fixed.

Thank you.
 
I intend to make the AI character strike, then walk back maybe 1-2 units, wait a random amount of time, come in and attack again. What is your suggestion on how to make the character move back 1-2 units away from the player character (2.5D game)? It is not possible to set up a waypoint since the location of the player is not fixed.
For this I would create a custom task that does the movement. This would be similar to the movement task within the Deathmatch AI Kit that allowed the character to move with a specific strategy. You can still use the regular Start/Stop Use task to do the actual attack.
 
Top