Hello!
I'm making an event to allow me to dynamically choose which event in a map will move without making a too convoluted event page, so i created this:
But then i noticed that using a script the game will not wait for it to end before progressing to the next command, so I found an old thread where a guy had the same problem, but with message texts, and they advised him to use this method:
I decided to try it, using the 'route' case, and wrote the script this way:
Unfortunately it didn't work, giving me instead this error:
What does it mean? Does it mean that i'm using the wrong case? Or I wrote the code wrong?
Thanks in advance.
I'm making an event to allow me to dynamically choose which event in a map will move without making a too convoluted event page, so i created this:
$gameMap.event(i).moveStraight(direction);
//Where "i" is the event that will move, and "direction" is where it will be headed to.
//Where "i" is the event that will move, and "direction" is where it will be headed to.
But then i noticed that using a script the game will not wait for it to end before progressing to the next command, so I found an old thread where a guy had the same problem, but with message texts, and they advised him to use this method:
Game_Interpreter.prototype.updateWaitMode = function() {
var waiting = false;
switch (this._waitMode) {
case 'message':
waiting = $gameMessage.isBusy();
break;
case 'transfer':
waiting = $gamePlayer.isTransferring();
break;
case 'scroll':
waiting = $gameMap.isScrolling();
break;
case 'route':
waiting = this._character.isMoveRouteForcing();
break;
case 'animation':
waiting = this._character.isAnimationPlaying();
break;
case 'balloon':
waiting = this._character.isBalloonPlaying();
break;
case 'gather':
waiting = $gamePlayer.areFollowersGathering();
break;
case 'action':
waiting = BattleManager.isActionForced();
break;
case 'video':
waiting = Graphics.isVideoPlaying();
break;
case 'image':
waiting = !ImageManager.isReady();
break;
}
if (!waiting) {
this._waitMode = '';
}
return waiting;
};
var waiting = false;
switch (this._waitMode) {
case 'message':
waiting = $gameMessage.isBusy();
break;
case 'transfer':
waiting = $gamePlayer.isTransferring();
break;
case 'scroll':
waiting = $gameMap.isScrolling();
break;
case 'route':
waiting = this._character.isMoveRouteForcing();
break;
case 'animation':
waiting = this._character.isAnimationPlaying();
break;
case 'balloon':
waiting = this._character.isBalloonPlaying();
break;
case 'gather':
waiting = $gamePlayer.areFollowersGathering();
break;
case 'action':
waiting = BattleManager.isActionForced();
break;
case 'video':
waiting = Graphics.isVideoPlaying();
break;
case 'image':
waiting = !ImageManager.isReady();
break;
}
if (!waiting) {
this._waitMode = '';
}
return waiting;
};
I decided to try it, using the 'route' case, and wrote the script this way:
$gameMap.event(i).moveStraight(direction);
this.setWaitMode('route');
this.setWaitMode('route');
Unfortunately it didn't work, giving me instead this error:
What does it mean? Does it mean that i'm using the wrong case? Or I wrote the code wrong?
Thanks in advance.