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
3,933
Reaction score
4,845
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's Jams

I'm human
Global Mod
Joined
Mar 28, 2017
Messages
1,119
Reaction score
2,712
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
3,933
Reaction score
4,845
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
3,933
Reaction score
4,845
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

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,818
Reaction score
14,979
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
3,933
Reaction score
4,845
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

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,818
Reaction score
14,979
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

SA51K_SHADER_IDLE.gifZombie is not the only thing people turned into in this town. There is also something else here. Something has many different names in history, the plague, the black oil, the purity, the filth. And now, it's called the shade.
(Maybe too much X-File reference. :kaojoy:)
Thanks, google for putting together a random pixel art Olympics game in your logo that puts everything I've ever done to shame in pretty much every aspect. ;)
Chizuru
chizuru.png


anyway, i just recovered from Covid.
Work's been delayed for a month but now i'm back drawing again.
Ah yes i learned how to make name boxes Im now profeshonal
The snowy mountains in my game are finally done... what a crazy journey.

Forum statistics

Threads
113,611
Messages
1,076,224
Members
147,622
Latest member
RyougiKyo
Top