Help with soldier AI, please :)

Hi everyone,

I’m having issues with the soldier AI—if you watch the video, you’ll see what I mean. When the soldier isn’t with me, the enemy doesn’t attack constantly; I had set a timer so it strikes every 1–2 seconds. However, when the soldier is nearby, the enemy doesn’t stop attacking, and the soldier slides along the ground. I’d really appreciate it if someone who knows about this could help; I’ve been stuck on this for days and tried everything, but nothing has worked.

I couldn’t upload the video here—I think the site doesn’t allow it—but I shared it on Reddit, so you can watch it there.https://www.reddit.com/r/gdevelop/comments/1vkybre/help_with_soldier_ai_please/

a

What mean durum?

And no where you are changing that variable

So each time distance between dusmanler and askerlerimiz is below 150 you reset soldiri cooldown timer

Salam.
Maybe the animation is cyclical?


The situation actually involves a specific code structure: `durum = 0` represents the state where the enemy walks or stands still; `durum = 1` represents the state where it attacks; and `durum = 2` represents the state where it dies.

ım try animation loop on and loop off but not
It didn’t work.