I'm probably missing something obvious to a person experienced with Javascript, but I'm having trouble getting the script for Set Movement Route (Wait) from the "RPG MAKER MV / MZ Script Calls" database to work.
Basically in the long run I want to be able to do a Movement route for an event that is referenced by an in game variable. To start, I'm just trying to get event 2 in my debug map to take a step away from my player. This is the code I have so far in a script:
I can of course get the event to move away without waiting using
However, I'd like to know how to properly do a javascript movement route with wait.
Thanks for your time.
Basically in the long run I want to be able to do a Movement route for an event that is referenced by an in game variable. To start, I'm just trying to get event 2 in my debug map to take a step away from my player. This is the code I have so far in a script:
Code:
const self = interpreter;
const char = self.character(self._characterId = 2);
var list = [];
list.push({ code: Game_Character.ROUTE_MOVE_AWAY });
list.push({ code: Game_Character.ROUTE_END });
var route = {list:list, repeat:false, skippable:false};
char.forceMoveRoute(route);
this.setWaitMode('route');
I can of course get the event to move away without waiting using
Code:
$gameMap.event(2).moveAwayFromPlayer();
However, I'd like to know how to properly do a javascript movement route with wait.
Thanks for your time.