Event Touch Region Conditional Branch

I need a script to check if the event toches a certain region similar to this $gamePlayer.regionId()
I think it is:

$gameMap.event(EVENT_ID).regionId() === X;

EVENT_ID = Id of the event you want to check
X = Region Id do you want to check.
1.png

It doesn't work for some reason. The creature just stays in one place.
View attachment 131793
It doesn't work for some reason. The creature just stays in one place.
$gameMap.event(2).regionId() === 3;

You have to replace all the EVENT_ID just for the number of the event.
$gameMap.event(2).regionId() === 3;

You have to replace all the EVENT_ID just for the number of the event.
I was sure I tried it before, but this time it's actually working 😀 Thanks!

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/event-touch-region-conditional-branch.117488/