gearbox15

Villager
Member
Joined
Sep 4, 2018
Messages
8
Reaction score
1
First Language
English
Primarily Uses
VNM
Hello I'm a newbie who is trying to create a simple puzzle but I can't figure out how to make it.

Here is how I want it to go.

There four column which are basically buttons that the player needs to press in the right order to make an object appear in the room.

If they press the correct button there is a positive sound effect and they move to the next button.

If they press the wrong button there is a negative sound effect and they have start over.

(Please note that themselves column do not change verbally.)

The issue is that I don't know how to code the tutorials I have watched/read keep going over my head since they don't explain how things like switch or variables work or how to actually put them in any kind of order.

Any help that is offered would greatly be appreciated.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
4,259
Reaction score
5,152
First Language
EN, FR
Primarily Uses
RMMZ
You create 4 button events that can be triggered. For each of them, you set a conditional with a variable as a condition. If the variable is equal to a certain value (which will be the order in which you press each switch), play the positive sound and add 1 to the variable. If the player is wrong (which means the "else" branch of that conditional), play the negative sound and reset the variable to 0 (assuming the player will have to restart the puzzle)
 

gearbox15

Villager
Member
Joined
Sep 4, 2018
Messages
8
Reaction score
1
First Language
English
Primarily Uses
VNM
You create 4 button events that can be triggered. For each of them, you set a conditional with a variable as a condition. If the variable is equal to a certain value (which will be the order in which you press each switch), play the positive sound and add 1 to the variable. If the player is wrong (which means the "else" branch of that conditional), play the negative sound and reset the variable to 0 (assuming the player will have to restart the puzzle)

Ok, I know this going sound frustrating but how I set the variables?
 

Tea++

I'm human
Staff member
Admin
Joined
Mar 28, 2017
Messages
1,374
Reaction score
3,576
First Language
English
Primarily Uses
RMMZ
I don't know if you've seen this tutorial yet, but I hope it helps. :)
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
4,259
Reaction score
5,152
First Language
EN, FR
Primarily Uses
RMMZ
Ok, I know this going sound frustrating but how I set the variables?

You know how to add content to an event page? If so, there's an a command which is named "Control Variables" in the Game progression section (page 1 of the event commands). Once you select it, a window will pop-out and from there it's really simple. Select the variable, set the operation to "set" and set the constant to the number you want.
 

gearbox15

Villager
Member
Joined
Sep 4, 2018
Messages
8
Reaction score
1
First Language
English
Primarily Uses
VNM
Ok a bit follow of up. Now that I have made the basic outline for the puzzle, there is one element I need to really complete it. I need to make a chest that only opens after the puzzle is solved. I needed to a locked chest, I know their places that tell you how to this but everything they goes over my head. I also need for the chest to unlock after puzzle is done.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
4,259
Reaction score
5,152
First Language
EN, FR
Primarily Uses
RMMZ
Once the puzzle is cleared, activate a switch. Make it so in order to open the chest, the switch needs to be active (as a condition in a conditional branch, not as a condition for the event which is on the left side). You can even make another automatic event which appears once your switch is on to play a SE indicating that the chest is unlocked. Make sure to erase that event afterward tho.
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,971
First Language
English
Primarily Uses
RMMV
You could just play the SE in the same place where you turn on the switch when the puzzle is complete.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
4,259
Reaction score
5,152
First Language
EN, FR
Primarily Uses
RMMZ
@Shaz True lol. Silly me, always thinking about how to complicate stuff.

Do that instead of my auto event for the SE lol, a lot better.
 

gearbox15

Villager
Member
Joined
Sep 4, 2018
Messages
8
Reaction score
1
First Language
English
Primarily Uses
VNM
Ok so how you make a locked chest then?
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,971
First Language
English
Primarily Uses
RMMV
Use a chest quick event, then change the first page so what's there only gets executed if the switch is on.

To do that, go to the bottom of the first page of event commands and add a Conditional Branch to check if the puzzle complete switch is on. Select all the event commands that were auto-created, cut them (Control+X), then paste them into the True branch of the condition. Then in the False branch, just show a message to say the chest is locked.

It'll be something like this:

Code:
If Switch "Puzzle Complete" is ON
  ... these are the event commands that were auto-created in the Chest quick event
Else
  Text: The chest is locked.
End
 

gearbox15

Villager
Member
Joined
Sep 4, 2018
Messages
8
Reaction score
1
First Language
English
Primarily Uses
VNM
It took bit fielding but puzzle now workes thank you!
 

Latest Threads

Latest Posts

Latest Profile Posts

THE GAME AWARDS AHHHHHH!!!!!
I kept saying I suck at writing stories. But I can't believe I wrote one these days. Feels good now that the winged blonde girl I often share has an actual lore and plot going.
Huge breakthrough! I finally fixed the dimensions on the WEBM used in the cinematic that ends the demo and introductory segment in MC:RIS, around the one-minute mark:



(There's some audio desync because the capture is an MP4.)
Kudos to everyone making game jam games, because this month has been hell for my development time. I have made a cutscene, 2 sprites, and 1 tile.

I guess I've made conceptual progress in hammering out combat roles and having fixes to be implemented (though I haven't done that yet)
Yeah, it’s a status #3, but it’s just to let y’all know I think I’m gonna have to do a twofer on the Advent compilation tomorrow. I feel like butt. Have a fever. I want to descend into my crypt.

Forum statistics

Threads
136,819
Messages
1,270,405
Members
180,583
Latest member
Shrimpkobe
Top