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.
Boulder Puzzle Help

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
Okay...anyone who has played a Pokemon game will understand how this puzzle is supposed to work.

Basically, I'm trying to make it so that when the player pushes an object (ex. a boulder) onto a certain panel/switch, then that makes the path open up, right?

I have been successful in making the boulder move in a direction (though only one direction, sadly) and made it possible so that if the player steps on the switch, the door opens.

What I NEED to know is if there is a way so that when the boulder goes on top of the switch, the switch will activate. I've tried all I can, but every time the boulder goes on top of the switch, nothing happens. Any help is appreciated, thank you. ^_^

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member

As for moving the boulder, try an event activated by Action Button, which then has one Move Event in it (Move Away From Player).

For checking the position, use variables. The Variable Operations event command allows you to set a variable to the X or Y positions of any event or player on the map. So, do that, one variable for X and another for Y, and then use Fork Conditions to check if it's on the right spot. You can do it either by parallel process or in the event where you move the boulder.

**
Rep: +0/-0Level 82
Okay, the boulder-moving idea with making it just move away from the Hero was a great idea. Thanks for that.

However, as much as I try to tamper with Variables, I still cannot understand them for the life of me if a person just tells me how to do it. Call me nitpicky, but I guess I do better when I'm shown how rather than told...

*
Rep:
Level 85
Real Men Make Fan Games
Project of the Month winner for May 2009
Here is what you're going to look at doing...

In a parallel process somewhere on your map, do something similar to the following:

1) Make a new variable operation.  Select a new variable that you'll name "Boulder X".  On the next set of options, pick "Set Equal."  On the final set of options, select "Sprite", the event name of your Boulder, and "X Coordinate".  It's important that you DON'T use Screen Relative X, just X Coordinate is what you want.

2)  Do the exact same thing with a new variable called "Boulder Y".  Change "Y" out for all instances above where I said "X."

3) Go to your map and see what coordinates your switch is at.

4)  Go back to your event and make a conditional branch that checks if variable "Boulder X" is equal to the X Coordinate of your switch.  Inside of that conditional branch, make another conditional branch that checks if variable "Boulder Y" is equal to the Y Coordinate of your switch. 

That's going to be the skeleton of your system.  Put whatever you want inside of the second conditional branch; this will be what happens when the switch is pressed.  You'll need yourself some "Else" handlers if you want your puzzle to be unsolved when the boulder moves off the switch.

Hope that helps, enjoy!




**
Rep: +0/-0Level 82
Here is what you're going to look at doing...

In a parallel process somewhere on your map, do something similar to the following:

1) Make a new variable operation.  Select a new variable that you'll name "Boulder X".  On the next set of options, pick "Set Equal."  On the final set of options, select "Sprite", the event name of your Boulder, and "X Coordinate".  It's important that you DON'T use Screen Relative X, just X Coordinate is what you want.

2)  Do the exact same thing with a new variable called "Boulder Y".  Change "Y" out for all instances above where I said "X."

3) Go to your map and see what coordinates your switch is at.

4)  Go back to your event and make a conditional branch that checks if variable "Boulder X" is equal to the X Coordinate of your switch.  Inside of that conditional branch, make another conditional branch that checks if variable "Boulder Y" is equal to the Y Coordinate of your switch. 

That's going to be the skeleton of your system.  Put whatever you want inside of the second conditional branch; this will be what happens when the switch is pressed.  You'll need yourself some "Else" handlers if you want your puzzle to be unsolved when the boulder moves off the switch.

Hope that helps, enjoy!

Okay...I'm very sorry if I'm being difficult with this, but I followed those instructions to the letter, and yet all I get is that as soon as I enter the area where the "boulder pushed onto switch" event happens, it starts up immediately and then keeps repeating itself over and over, thus not even allowing the person to push the boulder onto the switch...the event just happens as soon as you go into the area.

I've tried adjusting so many things, but I either get the above mentioned effect, or just no result at all...Seriously, what am I doing wrong here...? I really don't wanna sound like a whiner, especially since I'm relatively new here.

*
Rep:
Level 85
Real Men Make Fan Games
Project of the Month winner for May 2009
Post your code. You're doing something wrong.

EDIT: I've posted a sample of code of something similar to what you're asking for.  Granted, the code is checking for multiple "boulders" on multiple switches, but the premise is still the same.  It works, trust me.

« Last Edit: February 23, 2010, 06:58:37 PM by madriel222 »




**
Rep: +0/-0Level 82
Okay, so...following your example, here's the process I did.



Again, nothing seems to be happening, but here's what should  happen in the game:


*
Rep:
Level 85
Real Men Make Fan Games
Project of the Month winner for May 2009
Found your problem! Or at least the first one that jumps out at me XD

See your conditional branches?  You're checking Boulder X and Switch Y.  This needs to be Boulder X and Boulder Y.

EDIT: Next thing that's going to go wrong is that your "Success" handler is going to trigger in a big loop once the boulder is in place.  To fix that, you'll need a third conditional branch within the other two that checks if switch "Rock Switch" is ON.  If it is, the event should do nothing; if it's not, carry out the event as written.

EDIT 2: Are you also just pulling the 14 and 15 from my code?  Those need to be the X and Y coordinates that your switch is sitting on.
« Last Edit: February 23, 2010, 07:42:50 PM by madriel222 »




**
Rep: +0/-0Level 82
*facepalm* D'oh! Okay, lemme try that...

EDIT: YES! It finally works! Oh my God...thank you so much! I literally was toiling over this all night and into today, and I am so relieved it works now!

Now that I finally have this down, I can finally get back to work with this area and the puzzles involved. Now I only hope to take this a step further and see if I can make it so that you would need boulders (or something else, whatever the case may be) on multiple switches for the path to open, but I'm guessing it'd get even more complicated...

In any case, I'm gonna be sure to credit you in my game for this. You helped me a LOT.
« Last Edit: February 23, 2010, 07:57:25 PM by TwilightPrince1002 »