checkEventTriggerHere, why it stop the player ?

hi guys, why when i call a rmmv command: obj.checkEventTriggerHere([1])
its stop moveStraight player !?
am not understanding why.
i try find why with some console.log but nothing.



if I remember correctly, when the player touches an event, he is supposed to be able to continue his way , with mouse.
but play the trigger command in event, example a sound..
but its play commands event and also stop move. !?

source code, look at line:16
https://codeshare.io/GqpyDq

thank for help and if you have any idea or sugest, my game use only mouse?
There is one idea that comes to my mind. That touch event gets triggered again and again. But it is a crazy one.
There is one idea that comes to my mind. That touch event gets triggered again and again. But it is a crazy one.

in fact i thing it because it call this prototype
PHP:
Game_Temp.prototype.clearDestination = function() {
    this._destinationX = null;
    this._destinationY = null;
};
if i remove it , it work
but why on original game, it not stop mouse,
is it because checkEventTriggerHere() are use only for keyBoard key check, and it another method for check when using mouse move path ????
am try understand 🙂
its exist a similar method checkEventTriggerHere, but for mouse moving path?

thats will avoid clearDestination() ???
@Jonforum the system clears the destination, because the an event that is not parallel is triggered.
Specifically, the prototype that process the main map touch is this one in the rpg_scenes.js, in the Scene_Map object:

Code:
Scene_Map.prototype.updateDestination = function() {
    if (this.isMapTouchOk()) {  <-- Checks if the map touch is possible.
        this.processMapTouch(); <-- Process the map touch inserting the destination;
    } else {
        $gameTemp.clearDestination(); <-- If the map touch is not possible, the destination is cleared;
        this._touchCount = 0;
    }
};

So, if we give a little look on the isMapTouchOk method:

Code:
Scene_Map.prototype.isMapTouchOk = function() {
    return this.isActive() && $gamePlayer.canMove();
};

So, as you can see, the map touch will return ok if the Game Player can Move. If we give a deep look in that method of the Game Player object you can notice this:

Code:
Game_Player.prototype.canMove = function() {
    if ($gameMap.isEventRunning() || $gameMessage.isBusy()) { <-- LOOK HERE
        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;
};

$gameMap.isEventRunning() check if an event is currently running on the map meaning that if it returns true, the method will return false and so the map touch will be considered not possible by the system.

So this is the flow:

MAP TOUCH --> CHECK IF THE MAP TOUCH IS POSSIBLE --> CHECK IF THE GAME PLAYER CAN MOVE --> IF YES, THE DESTINATION IS FOLLOWED; IF NO, THE DESTINATION IS CLEARED ($gameTemp.clearDestination()) .

So, for achieve your objective you can follow different paths:
• Make a condition for the Game Player canMove;
• Remove the clearDestination from the MapTouch method;
• Change the isMapTouchOk Method;
@Gamefall Team
thank a lot my friend, i will take a look soon as possible the logic you give me, am on AE for now .

Original thread: https://forums.rpgmakerweb.com/threads/checkeventtriggerhere-why-it-stop-the-player.88498/