No need to use move routes, this._pattern or this._originalPattern anymore!
You can freely set motions not only for events but also for players!
You can achieve motion that is not tied to the movement route.
You can set the start and end points of the loop, and you can also fix the pattern. https://twitter.com/i/web/status/1697327578384838898
In the example below, the motion is created using Sasuke Kannazuki's EventEffects.js and my EasyAction.js scripts.
Downloads AWY_MotionMaker.js Ver.4.2.0
Please follow the terms of use of RPG Maker MZ.
【Event】
this.character(characterId).isMotionPlaying() //Each Character
$gamePlayer.isMotionPlaying() //Player
//Is the motion playing?
this.character(characterId).motionName() //Each Character
$gamePlayer.motionName() //Player
//Gets the name of the current motion.
【Movement Route】
this.pauseMotion(); //Pause the motion.
this.replayMotion(); //Resume the motion.
this.clearMotion(); //Erase motion.
this.lockPattern(true/false/integer between 0 and 2);
//Fix the animation pattern so that it does not change arbitrarily.
While it is valid, the pattern will not be updated at all regardless of whether there is stepping animation or walking animation.
Enable if true or blank, disable if false.
In the case of numbers, the pattern is immediately reflected and then locked.
this.setAppDir(0/2/4/6/8);
//Change the apparent direction.
You can see its usefulness by taking a "1 Step Forward" after this script.
Current direction without input. Cancel with 0.
this.callMotion("name");
this.callMotion("name", wait);
this.callMotion("name", wait, loop);
this.callMotion("name", wait, loop, speed);
//Call the motion.
Enter the motion name in "name",
the truth value (true/false) to indicate whether to wait for completion in "wait", the playback speed in "speed", and the number of loops in "loop".
If "wait" is not entered, the preset will be followed.
If "loop" is not input, it will follow the preset, and if it is -1, it will loop infinitely.
If "speed" is not entered, the preset will be followed.
this.waitForMotion(); //Wait until the motion is finished.
this.forceDir(direction); //Forces the direction to change regardless of whether the direction is fixed.
Down:2 Left:4 Right:6 Up:8
【Motion】
You can use everything that can be used in "Set Movement Route".
※The following commands are not required, but may be useful in some cases.
//LoopStart //This is the starting point of the loop.
//LoopEnd //This is the end point of the loop. Subsequent commands will be executed only once at the end.
//Pause //Pause. It will not proceed unless restarted from the plugin command.
Be sure to include a double slash before the command.