How I can do, that an Event jump to an regionId?

Hello,

i dont know how I can do it. I want that my event jump to regionId(1).

I tried this code:

$gameMap.event(3).locate($gameMap.regionId==1.x, $gameMap.regionId==1.y);

It dont works... can someone help me? I am realy bad in coding.

Thank you.
The problem is any number of tiles can have any given region id. You need to clarify if which of those tiles you want it to jump to. If you want it to be a random tile of that region that would require another script
I only have one tile with RegionId(1) and the event should jump to it.
Then why not just put in the coordinates of that tile directly into the jump command?
I have multiple RegionId that the event can jump to. It's a mini-game. It's a bit complicated to explain.

The code I wrote above makes one event jump to another. This works well, but doesn't work well for my mini-game. It would be easier with RegionId.
The issue is, to do it the way you want to do is really inefficient. You would have to loop through the entire map, or up until you reach that tile, to find which tile has that region id, store those coordinates in variables, then jump to those variables.

Or you know, you could skip that whole process and just jump to the coordinates directly.
Okey I try to jump to the coordinates directly.

Thank you 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-i-can-do-that-an-event-jump-to-an-regionid.171300/