PROBLEMS MAKING A ROCK-PUSHING PUZZLE

Posts

Pages: 1
I've hit bit of a wall trying to figure out how to event a certain puzzle into my game. Here's what I'm after:

In a dungeon, there's a large lake, let's say 15x15 squares. The player has to get across by pushing rocks into water. There are 20 rocks ready to be used nearby. When a rock is pushed into water, it stays there and can be walked over, and other rocks can also be pushed over it. There are some obstacles in the water, so he cannot just push 15 rocks to form a straight bridge to get to the other side. The problem is, the body of water is huge, and the choices where the rocks can be pushed into are, in a certain sense, limitless.

I'm trying to do this in Rpg Maker VX. The normal way for me to do any kind of a rock-meets-switch puzzle is to make parallel events that track the location of the switch, and the rock, and make something happen when those conditions are equal. But now I have a huge body of water and a dozen rocks so I can't make parallel events to track all that mess.

Do you think it's possible to make this work without too many parallel processes? By like changing the properties of the rock sprites to be unmovable and walkable over when they come in touch with water tiles? How exactly? Or is scripting the only answer (I know nothing of that art)?

Thanks :)

LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
This has nothing to do with scripting, and changing the properties of the rock sprite isn't a bad thing to do but doesn't solve any problems since you still have to detect that it comes in contact with water tiles.

Parallel processes are actually not the best way to go here. There's a smarter way to do it with events. Don't track the rock's location with a parallel process - track it in the rock event. When the player pushes the rock, the rock can set its new X/Y coordinates to a set of variables.

If the new coordinates are at the edge of the water, then the player either just pushed the rock to the edge or is trying to push it into the water (but can't because the water is impassable). You can detect which of those two things is true by then checking the player's location. If the player just successfully pushed the rock to the edge he'll be two tiles away from the rock; if the player is trying to push the rock into the water he'll be one tile away from the rock and facing the water; if the player is one tile away from the rock but not facing the water, he just tried to push it into a wall instead. If the player is trying to push the rock into the water, move the rock into the water, play a sploosh sound, and turn on a self switch that changes the rock to page 2. Page 2 of the rock will be the rock floating in water; it will be passable.

Just use one set of X/Y variables for "most recent rock pushed" and change it each time the player pushes any rock. You don't need a separate variable for each rock.

With this method, you just need to make one rock and then you can copy and paste that rock to make all your other rocks. Nothing will need to be changed from rock to rock.
Marrend
Guardian of the Description Thread
21781
I did a take on the rock/switch puzzle once, but I'm not exactly sure if what I did would be of any benefit to you. Now, if the rock was being pushed onto an object, and that object created the bridge, I might be able to be of greater assistance.

Or, you know, you could try what LockeZ suggested.
LockeZ, a wonderfully simple and clever way of getting around this problem! Without trying it in practice yet I can think of no reason why it wouldn't work like you suggested - I'll have a try later setting it up.

Thanks for the help. :)
Marrend
Guardian of the Description Thread
21781
The only thing I'm seeing as a potential problem is if the player exists the screen for any reason. What would happen to the rocks? The ones previously pushed into the water would would be on Page 2 and all that, but would they not revert back to their original locations? In fact, wouldn't all the movable rocks revert back to their original locations, Page 2 or no?

I submit that I could be missing/forgetting something.
Well at the point where the rock meets water and makes a sploosh sound, I'd wager you have the event memorize its own coordinates. And on page 2, called upon by the active switch (regardless if you exited and re-entered the room), have it recall those coordinates and move itself to the location pushed. That should work.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
I would totally expect all rocks to return to their original locations when leaving the map - in fact, this is something you want to happen, since the player can push the rock into a corner or into the wrong place in the water and need to reset the puzzle.

You may need to add a few event commands to the exit leading back out of the room, so that if the player leaves the room before solving the puzzle, all the rocks' self-switches are reset.

When the player solves the puzzle, goes across the rock bridge, and leaves through the other exit, you probably want to turn on a switch that indicates the puzzle is solved. When entering the room after the puzzle is solved, you can either A) go through a ton of hogwash to move all the stones to their final positions automatically, or B) teleport the player to a copy of the room that's already solved and is noninteractive. I'd go with B, much simpler.
Pages: 1