Hello everyone!
I'm currently designing a dungeon that takes place in an underwater temple. The gimmick of said dungeon is being able to flip switches which either raise or lower the water level in the dungeon (there are only two levels: drained and flooded). Flipping a switch drains the water, and then flipping the same switch raises it again. In order to navigate the dungeon, players will have to drain the water, walk along the lower level and push blocks around, and finally raise the water, lifting the blocks with the water forming paths that players can take to travel between upper level surfaces. I had achieved this by creating two separate maps for each room in the dungeon, one map for the drained state and one map for the flooded state. Flipping a switch initiates a transfer between maps. In order to remember where the blocks have been pushed to, I set up the transfer event to store each block's X and Y coordinates in a variable and then have an event in the destination map place the blocks at those coordinates. It works, but the problem is it takes forever. This is a good size dungeon, and there are several blocks in each room. I was wondering if anyone could come up with a way to handle this better, preferrably utlizing only one set of maps for the dungeon instead of two, and a way to remember an event's location upon transfers without the use of an event for each block.
Thanks in advance.
Draining/Raising Water Level in Dungeon
● ARCHIVED · READ-ONLY
-
-
for remembering the position of an event on a map, search the forum for Shaz' "Remember event position" script.
You'll still need an event to read the changed positions from the other map however, but those events no longer need to run continually, but only if the event had been moved since last time. -
I've moved this thread to RGSSx Script Support (since you can do the whole lot with scripts). Please be sure to post your threads in the correct forum next time. Thank you.
Use my Remember Event Position script (thanks Andar ;) ) to remember the positions if you need to. This will work on a single map - it won't let you set an event on one map to a corresponding event's position on another map.
Use Tsukihime's Tile Swap script to change the water level in the dungeon, using only a single map. -
Wouldn't it be better to use just one map event where you trigger the switch to raise/lower the water? In one event page you can replace the water tiles with dry floor, but have a fade-out before, and a fade-in afterward, and use either a switch or a self-switch to indicate whether the water is drained. In another event page you could fadeout, replace dry tiles with water tiles, fadein, et cetera.
The screen would be blanked, so the player wouldn't need to transition, nor would he "see" the water drain; this might be rather easy to implement. I'm assuming it takes some "time" in game-time to empty or fill the water tiles; so that explains the blanked screen.
No need to store the player's x/y location, either. The player activates the switch, and remains in place; well, if the player (or followers) are standing where water is or was, and the change is made, then there is an outside possibility of some unknown "graphical glitch" but in general, the game should work.
Or, something like that. I think it could be a bit simpler, packing the changes into one map's event, and just a few event calls. -
I don't what you plan to do but here is a demo of what I did :| (At 12:00 PM :p )
https://docs.google.com/file/d/0B3_OacH8sGtDdHRhYUt0bVd6dXc/ -
You guys are amazing. I got my idea to work the way I want using the suggestions you all made. Thank you very much. Consider this one solved. :)
Also, sorry about posting in the incorrect place. -
@Animeleafpath
Ah. I see. But that leaves a transparent hole where the water would have been, showing the parallax back.
In that case, if you don't want a "hole in the world" where the water drained, I would suggest a solution so that you could use just one map. It requires just a bit of copying and editing of a tileset. But first I would also recommend opening the Help file and finding the page titled "Resource Standards" which specifies the size or positioning of the tile graphics.
If you can find where the "Dungeon_A1" tileset (that you're using for this map instance) is located, you can duplicate it to a new tileset graphic in that folder, and use a photo or image editor software to make surgical alterations to the copy.
Find the water auto-tiles your maps use, located near the lower-right corner, as three side-by-side images of your water -- edit the part that would appear animated as moving water pieces. The place where the water was, should end up looking similar in color and tone to the pixels for the part that was above the waterline. Tweak pixels further, to your liking. Once you've got this section looking decent, save and go back into your map with the switch event.
Now, for correcting the event; you could use just one event page with a conditional branch, or two event pages, one of them dependent upon the state of a switch or self-switch being ON. Myself, I think either of these approaches would work, but I would try the two event pages method.
The event command to switch the tileset is in the event commands tab #3, under Map, as the button "Change Tileset..."
Edit:
Also, I don't think you need the 'Exit Event Processing' in each toggle event, because you aren't using a conditional branch, and that statement isn't useful in the context you use it. -
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.