The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Erk64 on June 12, 2007, 04:21:17 PM

Title: [RESOLVED] buttons and boxes
Post by: Erk64 on June 12, 2007, 04:21:17 PM
I'm working on a puzzle where you have to push several boxes onto buttons to reveal a chest, but the whole thing is so full of switches and variables that if anything goes wrong, it takes me forever just to figure out what happened. There must be an easier way to do this, so I'm asking for your input.

How should I go about setting up this puzzle so it's as painless as possible for me?

(I'm using XP)
Title: Re: buttons and boxes
Post by: Kokowam on June 12, 2007, 07:16:18 PM
Just like scripting, it's important to put commenting in. I recommend you use those as you go along. Anyways... Just make a variable which I will call "Chest" here. Anyways, make it so that when there is an "Event Touch" or "Collision," the switch event will add 1 to "Chest," turn on Self-Switch A, and go to a blank page. (Make sure each switch is set to "Through") Then, make an event for a chest that has a precondition of variable "Chest" at the number of switches. That was sooooooo unclear. Try to understand it to the best of your ability. :P
Title: Re: buttons and boxes
Post by: Erk64 on June 12, 2007, 08:35:43 PM
I understand it well enought when the player activates the button/switch by stepping on it, but how do you go about activating a switch when you try to push an object on top of it? (Think Zelda)
Title: Re: buttons and boxes
Post by: Kokowam on June 12, 2007, 09:00:52 PM
Yeah, shouldn't event touch work? You can just have a conditional branch that checks if the hero's X and Y are equal to the switch's place so that the hero itself can't activate the switch.
Title: Re: buttons and boxes
Post by: Knight Rider on June 13, 2007, 03:35:34 AM
Quote from: Erk64 on June 12, 2007, 08:35:43 PM
I understand it well enought when the player activates the button/switch by stepping on it, but how do you go about activating a switch when you try to push an object on top of it? (Think Zelda)

ah....well this is one puzzle im using for my game so.......

Make a Event, i will call it "Block", Collision with hero, and put a move event: This Event, Face Hero, Step Away from Hero. Now then make a new event, i will call it "Switch Checker", put inside a conditional branch that check if "Block"'s X and Y is equal to the area where the switch is, if the X and Y coordinates matches, put a Switch operation and make switch "Puzzle Solved1". Now put in the doors event (if theres one) a new page with th precondition "Puzzle Solved1" is on, leave it blank and change the grafic to a open door or whatever it is.....and there you go.

oh.dont forget to make a new event, i will call it "Swithc Checker2" and put inside if Hero's X and Y is equal to the area where the switch is, turn the switch "Puzzle Solved1", and in the else handler switch operation "Puzzle Solved1" off.....so when the hero moves out of the place, the door will close....... :D (note i use 2k3, put if your not using script, it will work the same)

Still confuse, fell free to ask
Title: Re: buttons and boxes
Post by: Erk64 on June 13, 2007, 04:24:47 AM
I don't think you can check to see if the X and Y of the block and the switch are equal using conditional branches in rmxp. Or would I have to use variables...?
Title: Re: buttons and boxes
Post by: Knight Rider on June 13, 2007, 04:33:39 AM
well if you cant do that....you'll have to use variable
Title: Re: buttons and boxes
Post by: Erk64 on June 13, 2007, 05:19:03 AM
...Okay, I think I got it. I appreciate your help. This should work. Thanks!
Title: Re: [RESOLVED] buttons and boxes
Post by: Knight Rider on June 13, 2007, 05:33:34 AM
np Erk64  ;)