Hi everyone.
I'm currently trying to script the following behavior to an event.
Basically I want this NPC to go to it's smartpath destination, but when the player is too far away it stops, tells the player to keep up, and waits for them to be close enough. Then it keeps walking.
So something like this:
Track player X and Y position
Track this event's X and Y position
if (eventX - playerX >= 10 || eventY - player Y >= 10)
 cancel event smart path to destination
 Gab window text "Hey, keep up!"
 wait until player is close enough, then re establish smart path
else
 smart path to destination
This is what I've put together so far, which is not working. It's just going through the script over and over, as shown by my console log literally 2 seconds after the game starts. For whatever reason it's not actually stopping and waiting for the player.
Protected download
Protected download
Protected download
Am I going about this the wrong way? I'm pretty new to this so there might be a way easier way to do this.
Thanks in advance!