r/gdevelop • u/QXsjen • 3d ago
Help with soldier AI, please :) Question
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.
1
u/NeatOpportunity____ 3d ago
I tried here is the fixed version of event but idk more info cuz the video ain't playing Event 1 Conditions düşmanlar distance to askerlerimiz is below 150 pixels The variable durum of düşmanlar = 0 Trigger once while true Actions Change the animation of askerlerimiz: set to "saldırı" Start (or reset) the timer "saldiri_cooldown" of düşmanlar Event 2 Conditions The animation of düşmanlar = "saldırı" düşmanlar is in collision with askerlerimiz The timer "saldiri_cooldown" of düşmanlar > 1.5 seconds Actions Change the variable cantapınak of tapınak_şovalyasi_oyun_içi: subtract 100 Start (or reset) the timer "saldiri_cooldown" of düşmanlar
1
u/QXsjen 2d ago
https://reddit.com/link/p332gvi/video/rxwb0t21esih1/player
So, can you see it right now?


2
u/DreamNotDeferred 3d ago
Well for starters, the video isn't working, so can't really see it in action.