Checking a Conditional Branch when an Event is on a region

I apologize if this is in the wrong thread but, does anyone know how do you create a conditional branch for when an event walks on a certain region tag it checks a conditional branch to see if they are on that region.

For example Event 1 walks onto Region 3 how would I check if that event is on that region?
Do you need that as Java Script Code?
If not, with Events it could look like this:
Code:
◆Control Variables:#0012 MyEventMapX = Map X of This Event (or direct Event ID)
◆Control Variables:#0013 MyEventMapY = Map Y of This Event (or direct Event ID)

◆Get Location Info:My Variable Location Info for me, Region ID, ({MyEventMapX},{MyEventMapY})

◆If:Location Info for me = 1 (If the Event is on Region 1)
- Do your stuff
end
like the above, you for an scriptcall using

$gameMap.event(x).regionId() === y

X as being the ID number, and Y being the region ID
both ways works though.
It looks like that this is a very short and useful Script Line. Thank you for sharing.

This could have Safed me some time i spent puzzling around =).
Thanks guys for helping me out. I was able to implement the code suggested by Shadow Dragon into my game.
I used it for my player $gamePlayer.regionId === x
so for events its almost the same, but slightly different.

Original thread: https://forums.rpgmakerweb.com/threads/checking-a-conditional-branch-when-an-event-is-on-a-region.110907/