1- If the enemy is away put him in “idle”
2- if you’re close to him he changes his animation to “run”
3- if he is very close to you then he changes his animation to “attack”
Now all of this works on 1 single enemy as you can see here …
But if I add 2 enemies of the same kind, it doesn’t work the way it should and looks buggy as you can see here…
Now I tried using pick a random object thing (I don’t know what it means but I know it has something to do with that… I think)
Also tried using for each loops and it doesn’t work too
What I need is to make each enemy separate with the same behavior
Move and act the same as it was with just 1 enemy …
Hope anyone can help me with this because I have been trying for hours and I’m starting to hate life
In your event i guess it’s because one of ennemys is already near Miko, then all the ennemy move but the engine is fast and execute left and right very fast for each ennemys, so nothing move proprely.
And here you use “scene timer” for use attack on your ennemys, but this timer is same for all the ennemy because it’s scene variable then all ennemy attack is same time, prefer use “object timer”.
With this “object timer” each ennemy willl have a different timer.
This allows enemies to be out of sync on attacks
Hey Bouh thanks a lot for your help and yup object timers it is, Kink helped me fix it and I finally managed to fix it along some small bugs but it’s still a bit messy (from codes perspective) and I think I need to learn this behavior thing to make things a little cleaner.
Never used it before so I hope I will understand it…
anyway it works! and that’s what matters for now…