MV Dashing/Running like Mother 3

hi, i want to know how can i make dashing like in Mother 3 (hold run button for a short period of time then release)
after this, the character starts running by their own (the movement keys are used to change the direction) and only stops when they touch a wall or if the player presses the run button again (also, this mechanic can be used to ram weaker enemies to stun or kill them instantly, in case this is too hard to make, then ignore the last part)

example below (1:07:58):


and here is the wiki, i think it explains better what i want:


also, i want to know if i can pay someone if needed
Probably you can event it too. Parallel common event checks your run button, changes player speed and puts a repeating move route on you player and turns a switch on for another parallel common event that checks your button presses and turns direction and puts a repeating move route on that direction. Then the parallel event can also check that if the tile in front of player is impassable you stop the move route (maybe with animation and jump in place etc). Same if you press the run button again. Also you can make the run event turn on another switch and then have your enemies and events have a player touch page with that switch condition to launch the ram event.

But yeah, maybe someone can make you a plugin too LOL.
Probably you can event it too. Parallel common event checks your run button, changes player speed and puts a repeating move route on you player and turns a switch on for another parallel common event that checks your button presses and turns direction and puts a repeating move route on that direction. Then the parallel event can also check that if the tile in front of player is impassable you stop the move route (maybe with animation and jump in place etc). Same if you press the run button again. Also you can make the run event turn on another switch and then have your enemies and events have a player touch page with that switch condition to launch the ram event.

But yeah, maybe someone can make you a plugin too LOL.
i remember doing something like that before and making my game super laggy, but maybe i made the event wrong

¿is there a problem if i ask you to show me how to make the events? (like screenshots)
it may be coded with a global switchs.
if the button "shift is longPressed" and is moving => switch on
if not moving (like against the wall, or stops => switch is off, no dash

but shouldn't be to difficult though.
it may be coded with a global switchs.
if the button "shift is longPressed" and is moving => switch on
if not moving (like against the wall, or stops => switch is off, no dash

but shouldn't be to difficult though.
ok i did it, now i need to know how can i make the player move in diagonal haha
ok i did it, now i need to know how can i make the player move in diagonal haha
either evented or by plugin, galv_diagonal is one plugin, but there may be others.
I believe victorEngine (VE) has one too, probably more.

but it depends what plugin you use and which one works best.

you just have to search to see what works.
either evented or by plugin, galv_diagonal is one plugin, but there may be others.
I believe victorEngine (VE) has one too, probably more.

but it depends what plugin you use and which one works best.

you just have to search to see what works.
i use san_analogmove, but i dont know if i can make a check for diagonal movement or how to event diagonal dashing/running (like in mother 3 where the character can dash/run in diagonal too)
by default, the function runs through this one:
JavaScript:
    Game_Player.prototype.updateDashing = function() {
        if (this.isMoving()) {
            return;
        }
        if (this.canMove() && !this.isInVehicle() && !$gameMap.isDashDisabled()) {
            this._dashing = this.isDashButtonPressed();
        } else {
            this._dashing = false;
        }
    };

    Game_Player.prototype.isDashButtonPressed = function() {
        return Input.isPressed('shift');
    };

so any direction should work by default:
(left, right, up, down, up-left, up-right, down-right, down-left)

if they implement that part.

so even event the dashing progress, this runs.

modify this code by this._dashing to alter to a new switch/function to be true
if button is long pressed. it should automatically work for all directions.

if this isn't the case, than show us what you did.
I don't know if anolog movement alter dashing or not.
by default, the function runs through this one:
JavaScript:
    Game_Player.prototype.updateDashing = function() {
        if (this.isMoving()) {
            return;
        }
        if (this.canMove() && !this.isInVehicle() && !$gameMap.isDashDisabled()) {
            this._dashing = this.isDashButtonPressed();
        } else {
            this._dashing = false;
        }
    };

    Game_Player.prototype.isDashButtonPressed = function() {
        return Input.isPressed('shift');
    };

so any direction should work by default:
(left, right, up, down, up-left, up-right, down-right, down-left)

if they implement that part.

so even event the dashing progress, this runs.

modify this code by this._dashing to alter to a new switch/function to be true
if button is long pressed. it should automatically work for all directions.

if this isn't the case, than show us what you did.
I don't know if anolog movement alter dashing or not.
oh what i did was what rpglord69 said, but i could try what you did, but idk how to use longpress
you can try this (untested)
JavaScript:
    Game_Player.prototype.updateDashing = function() {
        if (this.isMoving()) {
            return;
        }
        if (this.canMove() && !this.isInVehicle() && !$gameMap.isDashDisabled()) {
            if (Input.isLongPressed("shift")) {
                this._dashing = $gameSwitches.setValue(5, true);
            }
        } else {
            this._dashing = $gameSwitches.setValue(5, false);
        }
    };

so if you use longpress shift (this is around .5 seconds up to 1 second when the switch
flips true.

once the player is moving, it will return, once you stop or move into the wall,
the switch is false (which makes, dashing is false).

change the switch id (5) to your desired switch ID.
you can drop in the code in a new JS and into your folder.
you can try this (untested)
JavaScript:
    Game_Player.prototype.updateDashing = function() {
        if (this.isMoving()) {
            return;
        }
        if (this.canMove() && !this.isInVehicle() && !$gameMap.isDashDisabled()) {
            if (Input.isLongPressed("shift")) {
                this._dashing = $gameSwitches.setValue(5, true);
            }
        } else {
            this._dashing = $gameSwitches.setValue(5, false);
        }
    };

so if you use longpress shift (this is around .5 seconds up to 1 second when the switch
flips true.

once the player is moving, it will return, once you stop or move into the wall,
the switch is false (which makes, dashing is false).

change the switch id (5) to your desired switch ID.
you can drop in the code in a new JS and into your folder.
ok so it works, but i found 2 problems
1- is when the player touches a wall it didnt stop him from running (if i change direction, he will continue running instead of walking)
2-cant move diagonally, maybe san analog move changed something, so, i can show/send the plugin if you want
okay, analog update dashing here:

JavaScript:
Game_Player.prototype.updateAnalogDashing = function() {
    this._dashing = (
        this.canMove() &&
        !this.isInVehicle() &&
        !$gameMap.isDashDisabled() &&
        (this.isDashButtonPressed() || $gameTemp.isDestinationValid())
    );
};

so while the above may work without this plugin, I have no idea
how to make this one work.

you can rewrite it, and return the switchId and try out maybe something like:

JavaScript:
Game_Player.prototype.updateAnalogDashing = function() {
    this._dashing = (
        this.canMove() &&
        !this.isInVehicle() &&
        !$gameMap.isDashDisabled() &&
        $gameSwitches.value(5)
    );
};

but I don't use it, so its a wild guess, so I can't help you here though.
there may need some other changes, but this is the only dashing inside
the analog move plugin.
okay, analog update dashing here:

JavaScript:
Game_Player.prototype.updateAnalogDashing = function() {
    this._dashing = (
        this.canMove() &&
        !this.isInVehicle() &&
        !$gameMap.isDashDisabled() &&
        (this.isDashButtonPressed() || $gameTemp.isDestinationValid())
    );
};

so while the above may work without this plugin, I have no idea
how to make this one work.

you can rewrite it, and return the switchId and try out maybe something like:

JavaScript:
Game_Player.prototype.updateAnalogDashing = function() {
    this._dashing = (
        this.canMove() &&
        !this.isInVehicle() &&
        !$gameMap.isDashDisabled() &&
        $gameSwitches.value(5)
    );
};

but I don't use it, so its a wild guess, so I can't help you here though.
there may need some other changes, but this is the only dashing inside
the analog move plugin.
sadly it didn't work, but thanks anyway, you helped a lot

Original thread: https://forums.rpgmakerweb.com/threads/dashing-running-like-mother-3.182773/