I'm trying to make an enemy ai but can't make it work.
It should patrol beetween 2 point, when it reaches a point it would wait for a few seconds and go to the other point. When the player is close to him it should attack.
Hope you can help me cuz I've been trying to make it for 5 hours but nothing works properly.
You could maybe use the 'Tween' or 'Move To' behavior to make it move between them or you could use the 'Pathfind' behavior for it. As for knowing when the player is close, you could compare the distance between them.
Develop games in your browser. Powerful, performant & highly capable.
Hi, what type of gameplay is it? Plateform? Top view? There's different methods for different gameplays
Hi
I have exactly the same problem, I do not know your style of play, but my style of play is top down execution.
I would also be grateful if anyone could share or explain the source or the bare behavior for this.
Good luck
drive.google.com/file/d/1y-CLN2zdCSWfNB9q7EAfYdyRsdAaSqHg/view
This capx proposes two examples, one using Lerp for movement accuracy but is way more advanced;
Everything is explained and detailed in the capx