Player Movement problem

Hi there,

I have a bit of a problem, and I cannot figure out the solution!

I am using Yanfly's Picture Common Events plugin for a mini-game within my main game.

But.....when the mini-game is activated, the player can still freely roam the map. I would like the player to stay in place until the mini-game is completed.

The problem is that an Auto-run event disables all mouse input. I have tried a parallel process with the Player movement route, wait 60 frames command. This freezes the player, but disallows clicking on pictures to run common events.

Is there a solution to just stop the player from moving, and allow everything else?

I really can't find a solution to this, and any help would be greatly appreciated!

Best regards,

Fasold
If the mini-game is activated by triggering a map event and I want to solve it with eventing alone I would place empty below character events around where the player stands when they activate the mini-game event. Then have a switch activate an event page in the empty events and have those pages set to priority: same as characters. So like, invisible walls activate around the player when the mini-game begins. Set the player's direction fix to on if you don't want them to be able to turn around either.

The other option is to give if/else-statements for a switch the mini-game activates to player movement in rpg_objects :LZSwink:

Edit: I figured it's easy enough to just do it for you in case you don't know how to!

Find this part in rpg_objects:
Code:
Game_Player.prototype.canMove = function() {
    if ($gameMap.isEventRunning() || $gameMessage.isBusy()) {
        return false;
    }
    if (this.isMoveRouteForcing() || this.areFollowersGathering()) {
        return false;
    }
    if (this._vehicleGettingOn || this._vehicleGettingOff) {
        return false;
    }
    if (this.isInVehicle() && !this.vehicle().canMove()) {
        return false;
    }
    return true;

And add this before return true
Code:
if ($gameSwitches.value(10)) {
    return false;
}

So it ends up looking like this
Code:
Game_Player.prototype.canMove = function() {
    if ($gameMap.isEventRunning() || $gameMessage.isBusy()) {
        return false;
    }
    if (this.isMoveRouteForcing() || this.areFollowersGathering()) {
        return false;
    }
    if (this._vehicleGettingOn || this._vehicleGettingOff) {
        return false;
    }
    if (this.isInVehicle() && !this.vehicle().canMove()) {
        return false;
    }
    if ($gameSwitches.value(10)) {
        return false;
    }
    return true;
};

Change 10 to the switch ID you want to use!
Hey, thanks!

Great advice and thanks as well for the code!

Happy Holidays!

Original thread: https://forums.rpgmakerweb.com/threads/player-movement-problem.103612/