So I'm in the middle of creating a test-game. Right now I am trying to create a scene/town that looks something like this:
1. Player enters area
2. Player talks to NPC1, sets quest variable at 1
3. Player talks to NPC2, sets quest variable at 2
4. Player touches EVENT1 and NPC1 stops their current movement route and runs toward the player.
I am having trouble with step 4 and, while I've found a messy workaround, I'd like to learn how to do it the proper way.
The problem is that NPC1 has a custom movement route and, because EVENT1 is triggered by the player at any time, NPC1 will not always be in the same location when the event is triggered, so a precise movement route cannot be created.
My current workaround involves using the GALV movement plugin and using the script: this.step_toward(x,y) 19 times so that NPC1 eventually ends up at player's location at EVENT1 regardless of where NPC1 started on the map.
My question is this:
Is there a clean script command (or if statement) that I can use to get NPC to just move to the desired X,Y coordinates? Maybe something like an 'if' statement where "if NPC1's location !=(x,y), then step toward (x,y)".

1. Player enters area
2. Player talks to NPC1, sets quest variable at 1
3. Player talks to NPC2, sets quest variable at 2
4. Player touches EVENT1 and NPC1 stops their current movement route and runs toward the player.
I am having trouble with step 4 and, while I've found a messy workaround, I'd like to learn how to do it the proper way.
The problem is that NPC1 has a custom movement route and, because EVENT1 is triggered by the player at any time, NPC1 will not always be in the same location when the event is triggered, so a precise movement route cannot be created.
My current workaround involves using the GALV movement plugin and using the script: this.step_toward(x,y) 19 times so that NPC1 eventually ends up at player's location at EVENT1 regardless of where NPC1 started on the map.
My question is this:
Is there a clean script command (or if statement) that I can use to get NPC to just move to the desired X,Y coordinates? Maybe something like an 'if' statement where "if NPC1's location !=(x,y), then step toward (x,y)".
