Is there an easier way to make boulder pushing puzzles?

I've already make a few boulder pushing puzzles in the game I'm working on, and they work fine, but I'd like to know if there is an easier way of doing it. For example, I've a room with four boulders and four switches which all need to have boulders laying on them. The normal way of doing it is to have a parallel check to see if boulder 1 is on switch location 1, 2, 3 or 4, then you need to do the same with boulder 2 on all switch locations. Eventually, you need to set up the room where all four boulders have the possibility of being on all all four switches 4X4=20. So you'd need to have 20 different checks for all boulder/switch location possibilities before the player can proceed or get the treasure or whatever, as another player may not solve the puzzle the way you may have intended.

Example.JPG

In this example I just whipped up, the player would likely would push the 1st grey boulder on the blue switch, but somebody might just wind up pushing the middle tan boulders on the blue switch or.......?

I was wondering if there was an easier way of doing this? A plug-in, perhaps?
The normal way of doing it is to have a parallel check to see if boulder 1 is on switch location 1, 2, 3 or 4, then you need to do the same with boulder 2 on all switch locations.
wrong - it might be normal for you, but as you already learned that has more than a few problems.

first, you don't need a parallel at all - the boulders themselves should check in their movement process if they end on a switch or not.

second, the best way to check in this case would be by region code, not by coordinates. Just place a region code on all tiles with a switch and have them check if they are moved on a tile if it is that region code.

If it is, then they should count up a variable and mark themselves with self-switch A as placed.
(If you allow further movement, you'll need to check the selfswitch before the move and reduce the variable as well as disable the self-switch if the boulder is move off the target).

And then each boulder, after processing that, checks the value of the variable. If that is 4 (or however many switches you have on the map), then the puzzle is solved.
So how do I check if my boulder is on a region code. I looked through the conditional branch menus and didn't see anything tied to region codes. Perhaps try to explain this step by step because this is the first time I've done this.

EDIT: Nevermind, I got it all figured out here:
(Thanks Andar.)
regions aren't required at all, but is more optional.

you just increase a 1 variable by 1, when its on the event is YX position.
so when each has the XY correct, the door can check if variable = 4.

like andar said, you can do the check to open the door during the event,
to see if the variable is 4 as well, and open the door automatically.

parallel process in this part can make the game lag if done incorrectly, but
there are some events which require parallel to track down the XY, but not
for the this mechanic.

I won't regions in general for this part, if its a sliding puzzle, than I would,
but not for this pushing builder mechanic.
I'm sure there are a bunch of different ways you can do this. In one of my games, I had a parallel process which was checking:

If: Script: $gameMap.eventsXy(6, 4).length>0 && $gameMap.eventsXy(7, 4).length>0 && $gameMap.eventsXy(15, 4).length>0 && $gameMap.eventsXy(16, 4).length>0

Since the boulders in that room were the only events that could end up in those positions, I was just checking each set of pressure plate co-ordinates to see if it had at least one event on it (i.e. length>0), and if all of them passed them I'd give my congratulations message.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-an-easier-way-to-make-boulder-pushing-puzzles.180816/