AI stuck in attack

MissBig

Member
Hi, I did a simple zombie behavior based on the demo with behavior designer but my zombie gets stuck in the attack state. I'm having the zombie just idle in place then when the zombie sees the player it moves towards the position of the player. when a player is in range of attacking the zombie attacks which is fine but when the player moves away from zombie it does the transition to seeking the player but it is always attacking and sometimes it doesn't move except it keeps on attacking but if you go out of sight it will transition back to idle. I have tried looping the attack but it doesn't seem to work either way.
 

Attachments

  • ZombieBehavior.asset
    79.1 KB · Views: 11
What weapon is your AI using to attack? It sounds like one of the animator attack states isn't sending an event to indicate that the weapon has been used.
 
What weapon is your AI using to attack? It sounds like one of the animator attack states isn't sending an event to indicate that the weapon has been used.
Hi, I redid the animator so it's working but I still get the problem while the zombie is coming after me after he is attacking me and the player runs away while the zombie goes after the player he moves still towards the player but is still attacking at the same time when he is meant to be chasing the player. This only happens as soon as the zombie attacks player. Everything else works though.
 
Glad you are making progress! If you use the StartStopUse task and stop the agent from attacking when the zombie starts to seek does it work?
 
Top