Reading the region of an event on a map

Is it possible to have the region of an event on a map stored into a variable?


Say for instance I've called an NPC called Dude1 and he is moving through a world map consisting of different regions like desert, plains, forest, mountain, bridge and so on.


What I want to do is have the the number of the region he stands on stored into a variable so that I can use it in an event.


Any way to do that?
you use control variable command with two variables to load the position X/Y of the event into those variables, and then use the get location info command to load the region ID of that position into a third variable

Original thread: https://forums.rpgmakerweb.com/threads/reading-the-region-of-an-event-on-a-map.59441/