MV Trying to make a script call to activate all events on the player's tile.

I have these events that push the player around from spot to spot. Some really basic movement routes, nothing fancy. The problem is, when the player is finished moving, they don't trigger the events on the tile like they would have if they walked onto the tile on their own free will.

So, I'm trying to find a script call that will make the game trigger any and all events (specifically Event Touch events with a Below priority) on the player's current tile.

An easy example of what I'm trying to do is this: On tile 5,5 there is a touch event that transfers the player to another map. You walk onto the event, you transfer just fine. But, if you are targeted by a movement route event call which forcefully moves you onto tile 5,5 you don't trigger this event. I want a script call to play after this movement route that will force the game to check event touch triggers on the player's current tile.

Edit: To anyone who searches this topic in the future because you also had this issue, this code ended up working:

Code:
$gameMap.eventsXy($gamePlayer.x, $gamePlayer.y).forEach(event => event.start());
computers don't work that way.
you can only make a script function that loops through all events on that position and activate one after another.
and you'll need to be carefull as to what you place where - there are good reasons why move routes do not trigger follow-up events, you can easily get into an eternal loop that way...
Try one of these (untested):
  1. Trigger events at the player's location with trigger 1 (Player Touch) or 2 (Event Touch):
    JavaScript:
    $gamePlayer.checkEventTriggerHere([1, 2]);
    This will ignore events with "Same as characters" priority.

  2. Trigger all events on the player's current tile:
    JavaScript:
    $gameMap.eventsXy($gamePlayer.x, $gamePlayer.y).forEach(event => event.start());

caethyril:​


It works! Thanks a bunch! I think I'll close this topic now.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-script-call-to-activate-all-events-on-the-players-tile.141637/