Simple puzzle with map locations

Hey guys i have simple question regarding Map locations and Events. I think the picture below should explain everything. If they player pushes all rocks onto the arrow a door opens. My first idea was to have the player check if every arrow tile has a rock on them by pressing an external switch. The event would get the Event ID for every arrow tile and add +1 to an "open door" variable every time that is true. If the variable is 11 at the end (number of arrow tiles) the door opens. This needs 11 variables (for each tile one) and a bunch of conditional branches. 

I have been wondering if there is a simpler solution for this. Considering how weird i have handled this i'm pretty sure there is but i haven't been able to get behind that.

arrow.jpg
I would paint the arrow with region 1 for example. Then I would just check for every event if they are on region 1. If all 11 ifs say true then I would open the door using a switch.

To check the region of an event use the following script code inside the conditional branch:

$game_map.events[event_id].region_id == n

What you need:

  • 11 events for your stones + 1 event running parallel for the conditional branches
  • 11 conditional branches (inside each other)
  • 1 switch
  • 1 region
First of all, you can get the region without using a script call. On the third page of event commands is "Get Location Info" which can return the region, terrain tag, tile ID (each layer), or event ID.

That last option gives us another way for the controlling event to check if you're done: have it test each destination to see if there is an event sitting on it.
My issue was that you can only save the result, in this case the Event ID into a variable, that means you need X variables for each tile AND have to translate the Event ID into a more straight variable since you can't just ask "tile / region has event". I would like to prevent clutter whenever possible and it sounded like a problem that could have been solved better with a script call. 

I tried the option i have been given here with the script and it works flawlessly, thanks for the quick support. 

Original thread: https://forums.rpgmakerweb.com/threads/simple-puzzle-with-map-locations.47230/