RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Resolved] Having issues with an event system for a puzzle.

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 83
Hi there, I hate to have my first post on the forums be an "omg plz halp" thread, but I'm at my wit's end about how to make this work.

One of the dungeons in the game I'm working on has a puzzle where the player has to push boulders to specific spots on the ground in order to block off waterfalls coming down from the cliff walls below.  Once all the waterfalls have been blocked off, it drains a lake on the world map, which lets the party progress past that point on the map.

I set variables for the X and Y coordinates of each of the boulders on the map, and have these variables resetting to the X and Y of the events every time they're pushed.  Once these variables match the coordinates of the appropriate spot (cracks on the floor), it turns on a switch, which triggers an autorun event to "show" the boulder falling through the floor, and shows the waterfall beneath it slowly running dry.

I also have a variable ticking up by one each time the waterfalls are being shut off, so that when all the ones in one room are closed, it will trigger another switch to make that puzzle "solved" so that it won't reset upon leaving the room.

Furthermore (I really hope I'm not making this confusing by giving too many details), when each room is solved, another separate variable is ticking up by one, so that once all three rooms are solved, it will trigger another switch that will make the change on the world map.

The problem that I'm having is with the events to make the waterfalls "dry up".  The events are triggering and working fine, but for some reason at least one of them is not showing the animation changes for the waterfalls.  Which of these waterfalls this happens to is not consistent, and all of them work at least some of the time, and I'm very confused as to why they're only working some of the time and not others.



Here's a shot of the map itself (the map isn't completed yet and neither is the event coding, really, since I need all three rooms set up to finish it, but I figured it might help to give a visual).

Each of the boulders are coded like this:




Once the switches are turned on after the boulders hit the proper places, it switches to these pages :



The text command to show the variables are only in there for testing, so that I could make sure that the variables were coming up as what they were supposed to, and not somehow accidentally triggering the wrong events.

Pages 2-5 are identical, except for the switches needed to trigger them, and the events that they are calling on to change the graphic of.  I originally had the animation set to turn on transparency for the events, but set it to actually change the graphic instead, hoping that would fix my problem, which it didn't.

After that event plays itself through, it goes to this page, which is just a blank page there to keep the hole in the ground.



I took out the Parallel Process event that checks for the variables needed to "solve" the room to see if it had any effect on what happened, and the problem still occurred, so I don't think it has anything to do with it, but for the sake of completion, this is what that event looks like.



The other boulders are all coded the same, the only change being that each has their own variables for their coordinates, and their own switches to trigger the other pages.

All of the events are working as intended most of the time, but at least one of them keeps leaving out the actual move route changes.  I know that the events are triggering, because the rest of the events plays out perfectly fine, and the variable that "solves" the room is still hitting four and triggering that event after four waterfall events have happened, even though the waterfalls aren't actually visibly going away.

Like I said, it's not consistent which boulders and which holes are glitching like this, and I can't figure out for the life of me what is actually going wrong and why.  I was hoping that someone here might be able to see what it is that I'm doing wrong, or if I'm missing something really obvious or something.

I really hope this stayed coherent the whole way through, and I'm sorry for making this so long.  Thanks in advance for any help anyone can give me.
« Last Edit: March 17, 2009, 04:35:49 PM by Hotaru04 »

*
Rep: +0/-0Level 83
Figured it out, and it was something fairly obvious that I had missed until I realized the pattern the ones that weren't working were following.

It wasn't random ones not working, it was ones to the left of the events I had triggered.  Even though I had separate switches for each boulder, I was using the same four switches for the waterfalls.  The further to the right the events were, the further through the pages the events were turning to, so once one of the later switches was thrown, all of the other events would see that the later waterfall switch was thrown, and so would re-do that event, since it took priority over the others (being later in the pages), rather than the ones they were supposed to do.

It was a case of me trying to cut corners that backfired, once I gave each boulder it's own waterfall switches along with their boulder switches, the problem went away.

Looking back at my original post, I realize now that I didn't mention that I was using the same four switches for the waterfalls, which I'm sure someone would have picked up on if I had.  :-[

Anywhoo, resolved.  Sorry for taking your time.  :)
« Last Edit: March 17, 2009, 04:47:02 PM by Hotaru04 »