Can a variable be affected by event location?

Hi guys,
I'm trying to create a little puzzle, in which players will have to move an item (event), to a specific location on the map, in order to solve the puzzle.
Is there a way to create something like a conditional branch, that will react to an event location on the map?

I thought of using regions, but I see they are only made for encounters.
Is there a way to create something like a conditional branch, that will react to an event location on the map?
Sure.

I thought of using regions, but I see they are only made for encounters.
That's not correct. You can use region IDs for whatever you want.

You can use the regular Control Variables options (under Game Data -> Characters) to store the X and Y coordinates of an event. Then you can check those in a Conditional Branch to be the values you like.

Or you can use the Get Location Info event command to store the region ID of an event into a variable, then use Conditional Branch to check if it's the value you'd like.

I've moved this thread to MZ Support (from Product Discussion). Thank you.

I've assumed you're using MZ, based on your "Primarily Uses" info. 👋
Moved to: MZ Support (from Product Discussion) I've assumed you're using MZ, based on your "Primarily Uses" info. 👋
Yes 🙂 Thank you

Sure.


That's not correct. You can use region IDs for whatever you want.

You can use the regular Control Variables options (under Game Data -> Characters) to store the X and Y coordinates of an event. Then you can check those in a Conditional Branch to be the values you like.

Or you can use the Get Location Info event command to store the region ID of an event into a variable, then use Conditional Branch to check if it's the value you'd like.
Thanks a LOT, it works great!
I'm newbie to RPG Maker, so I was struggling to find it. Thanks again.

Original thread: https://forums.rpgmakerweb.com/threads/can-a-variable-be-affected-by-event-location.168154/