Galv's Move Route Extras MZ

Move Route Extras
RPG Maker MZ Plugin
Galv
​

Introduction
Additional functionality for move routes.


Features
This plugin adds script commands you can use in ‘Move Routes’ that enable you to do extra things during autonomous and forced movement such as:
– jump forward x spaces
– jump to an event or x,y position
– step toward/away from event or x,y
– turn toward/away from event or x,y
– turn on/off self switches
– fade opacity in/out
– move random only on chosen regions
– wait a random amount of time
– repeat commands a number of times
– play balloons/animations
– set graphic to a particular frame


How to Use
- Copy the "GALV_MoveRouteExtrasMZ.js" file into your project's /js/plugins/ folder.
- Activate plugin using the 'Plugin Manager'
- Read the 'HELP' documentation (also found in plugin manager) for more details and try the demo if you don't understand.


Plugin
Get it here


Credit and Thanks
- Galv


Terms
Free to use in any RPG Maker MZ project including commercial. Please credit "Galv".
:)
Thanks so much for your hard work. I always loved your Move Route plugin for MV, so it's great seeing the port for MZ.

I think, it can be vital for nice cutscenes.
Just had a look at it in your demo. So impressive, and contains all the things I'll want.

Thank you for this.
I love this plugin, I use it at the end of a police chase, when the timer runs out I have the cops walk back to where they were spawned from!

It's awesome but I did notice that if another object / event gets in the way, it stops the movement.

The visustella one is supposed to be able to move around & continue to the move round destination command but that whole thing doesn't work for me, I've tried it so many times.

What would be needed to have the event walking back to a destination, continue if interrupted?

I currently just have it repeated so I can make it back there. Adding it in once and having a continued journey back to a spot would be cool too.
This plugin doesn't do any kind of pathfinding, sorry. If that is what you meant?
This plugin doesn't do any kind of pathfinding, sorry. If that is what you meant?

yeah that might be what i'm needing.
While this fix is actually applied to a different plugin, it's only relevant if you're using this one so I'll post it here....

If you use this with Luna QMovement, you'll get a "character.cx is not a function" error when using the step_towards(x,y) command. To fix that, edit Luna QMovement and replace...
JavaScript:
const Alias_Game_Character_moveTowardCharacter =
  Game_Character.prototype.moveTowardCharacter;
Game_Character.prototype.moveTowardCharacter = function (character) {
  if ($gameMap.offGrid()) {
    const dx = this.deltaPXFrom(character.cx());
    const dy = this.deltaPYFrom(character.cy());
    let radian = Math.atan2(-dy, -dx);
    if (radian < 0) radian += Math.PI * 2;
    const oldSM = this._smartMove;
    if (oldSM <= 1) this._smartMove = 2;
    this.moveRadian(radian);
    this._smartMove = oldSM;
  } else {
    Alias_Game_Character_moveTowardCharacter.call(this, character);
  }
};

with...

JavaScript:
const Alias_Game_Character_moveTowardCharacter =
    Game_Character.prototype.moveTowardCharacter;
  Game_Character.prototype.moveTowardCharacter = function (character) {
    if ($gameMap.offGrid()) {
      let dx = 0;
      let dy = 0;
      try {
        dx = this.deltaPXFrom(character.cx());
        dy = this.deltaPYFrom(character.cy());
      } catch (e) {
        dx = this.deltaXFrom(character.x);
        dy = this.deltaYFrom(character.y);
      }
      let radian = Math.atan2(-dy, -dx);
      if (radian < 0) radian += Math.PI * 2;
      const oldSM = this._smartMove;
      if (oldSM <= 1) this._smartMove = 2;
      this.moveRadian(radian);
      this._smartMove = oldSM;
    } else {
      Alias_Game_Character_moveTowardCharacter.call(this, character);
    }
  };

Original thread: https://forums.rpgmakerweb.com/threads/galvs-move-route-extras-mz.126315/