Statue Code

Hey guys/gals, I need a bit of help with something I am trying to do. I am trying to make a statue code type lock where when the player presses them in the right order then they get something out of it, but if they press the wrong one in order then something bad happens.
Here is what I have it looking like right now:
1612134637757.png
The top one is to tell the player the riddle. So there are two different codes: Left Dragon, Priest, Golden boy = Treasure chest, Then Right Angel, Left Angel, Priest, Golden boy = Secret Stairs to the second boss. How would I go at setting this up? Thanks for the help in advance. BTW if you could do screenshots of some of the steps, it would be helpful.
You can use variables to make codes like this...lets call our variable "Secret Stairs"
Basically make an event page that adds +1 to the variable Secret Stairs...now you just need to make it trigger when "Secret Stairs" is at the right number...otherwise you set "Secret Stairs" to 0...and when "secret stairs" is at 2 and you hit the last statue it should trigger whatever effect it would when the person does the puzle...

You can either use conditional branches or just create a new page with the "variable "x" is "y" or above"...

Sorry for not putting screenshots...I am not on my computer now...but if you still can't figure out I can try to help you more latter =)
You can use variables to make codes like this...lets call our variable "Secret Stairs"
Basically make an event page that adds +1 to the variable Secret Stairs...now you just need to make it trigger when "Secret Stairs" is at the right number...otherwise you set "Secret Stairs" to 0...and when "secret stairs" is at 2 and you hit the last statue it should trigger whatever effect it would when the person does the puzzle...

You can either use conditional branches or just create a new page with the "variable "x" is "y" or above"...

Sorry for not putting screenshots...I am not on my computer now...but if you still can't figure out I can try to help you more latter =)
I understand, but am still a bit confused.
I understand, but am still a bit confused.
You have to give the statues a certain numeric order, yes? Then imagine this:
1612466040367.png


The number I just assigned to every statue is the order you have to press them. 1,2,3 gives you a chest, and 4,5,6,7 opens a secret staircase. The "X" would be a trap statue it's never used in any of the password, thus giving you an incorrect answer every time.

Now we have to tell this to the engine. With variables! Now pay close attention.

1612466661628.png


You'll have to use something called Conditional Braches. On each of the events for the statues. You'll want to check for an specific variable, let's call it "Puzzle Var".

Now, the eventing is pretty simple from here on: There's an event that starts the progression, it could be the Left Angel or Left Dragon depending on the route you're taking. From there, just keep increasing the numbers if the player interacts with the right statue, until they reach the prize!

It's very important to add an exception to our Conditional Branch, so we can reset the "Puzzle Var" and playing a buzzer sound to tell the player they have to try again.

When the statue has to check for two different values, like the Priest or the Golden Boy, you'll have to include another Conditional Branch into the exception of your initial branch.

Spoiler: Priest Example
If "Puzzle Var" equals 2

Add +1 to "Puzzle Var"
Play Chime sound.

Else

If "Puzzle Var" equals 6


Add +1 to "Puzzle Var"
Play Chime sound.[

Else

Reset "Puzzle Var"
Play Buzzer sound.
You have to give the statues a certain numeric order, yes? Then imagine this:
View attachment 178269

The number I just assigned to every statue is the order you have to press them. 1,2,3 gives you a chest, and 4,5,6,7 opens a secret staircase. The "X" would be a trap statue it's never used in any of the password, thus giving you an incorrect answer every time.

Now we have to tell this to the engine. With variables! Now pay close attention.

View attachment 178272

You'll have to use something called Conditional Braches. On each of the events for the statues. You'll want to check for an specific variable, let's call it "Puzzle Var".

Now, the eventing is pretty simple from here on: There's an event that starts the progression, it could be the Left Angel or Left Dragon depending on the route you're taking. From there, just keep increasing the numbers if the player interacts with the right statue, until they reach the prize!

It's very important to add an exception to our Conditional Branch, so we can reset the "Puzzle Var" and playing a buzzer sound to tell the player they have to try again.

When the statue has to check for two different values, like the Priest or the Golden Boy, you'll have to include another Conditional Branch into the exception of your initial branch.

Spoiler: Priest Example
If "Puzzle Var" equals 2

Add +1 to "Puzzle Var"
Play Chime sound.

Else

If "Puzzle Var" equals 6


Add +1 to "Puzzle Var"
Play Chime sound.[

Else

Reset "Puzzle Var"
Play Buzzer sound.
Ok. I get it now, I will make it and see what happens. Thank you for the help and screenshots, it helps a lot. Will let you know what happens. BTW with the if variable is 0, set to 4, what do you mean by that? Can you explain a bit.
Ok. I get it now, I will make it and see what happens. Thank you for the help and screenshots, it helps a lot. Will let you know what happens. BTW with the if variable is 0, set to 4, what do you mean by that? Can you explain a bit.
We have to separate the two passwords. So one starts at 1 and goes through 2 and 3, and the other one starts at 4 and goes through 5, 6 and 7.

So you have to set the variable to 4 so you can differentiate between the two passwords. The Conditional Braches will do the rest, so there's nothing to worry about.
We have to separate the two passwords. So one starts at 1 and goes through 2 and 3, and the other one starts at 4 and goes through 5, 6 and 7.

So you have to set the variable to 4 so you can differentiate between the two passwords. The Conditional Branches will do the rest, so there's nothing to worry about.
Ok. So I have the left angel set up part way I think. Does this look right?
1612494019349.png
Ok. So I have the left angel set up part way I think. Does this look right?
View attachment 178315
The first conditional branch is wrong, you're basically saying, if the Left Angel is the first one (Variable == 0), then set the counter to 4.

You'd want to do that with the Right Angel, since that's the one starting the password. You only want the "Variable [Secret Stairs] == 5" branch.

When you have two branches like that, it's because the event will accept more that two numbers, for example the priest or the golden boy. However, when they only accept one number you only need one branch.
The first conditional branch is wrong, you're basically saying, if the Left Angel is the first one (Variable == 0), then set the counter to 4.

You'd want to do that with the Right Angel, since that's the one starting the password. You only want the "Variable [Secret Stairs] == 5" branch.

When you have two branches like that, it's because the event will accept more that two numbers, for example the priest or the golden boy. However, when they only accept one number you only need one branch.
Ok, I am confused... Sorry if I am not understanding this. I don't do this stuff very much.
Ok, I am confused... Sorry if I am not understanding this. I don't do this stuff very much.
1612497105679.png

You won't need this conditional branch. Because with that branch you're implying that the Left Angel is the first one in the password, when it should be the Right Angel, or am I wrong?

Everything you need is to check if the Variable equals 5 at the moment the player is interacting.
View attachment 178320
You won't need this conditional branch. Because with that branch you're implying that the Left Angel is the first one in the password, when it should be the Right Angel, or am I wrong?

Everything you need is to check if the Variable equals 5 at the moment the player is interacting.
Ok, So Here is my right and left angel atm.
1612497576347.png

1612497596885.png
Ok, So Here is my right and left angel atm.
View attachment 178325
View attachment 178326

That's it! Well done.
That's it! Well done.
Ok, so would I put it like this if the right angel is first:
1612500433912.png

I do apologize. I am not very good at this. Still learning a bit.
Ok, so would I put it like this if the right angel is first:
View attachment 178329
I do apologize. I am not very good at this. Still learning a bit.

The right angel was good in the first image you sent me. You only have to check the variable once.

I'll give you an example of the stairs password:

Spoiler
Right Angel:
* Check if Variable is 0

Set Variable to 4
Else
Reset Variable

Left Angel:
* Check if Variable is 4

Add +1 to Variable
Else
Reset Variable

Priest: (This one may accept two values, "2" for the chest and "5" for the stairs.)
* Check if Variable is 5

Add +1 to Variable
Else
* Check if Variable is 2

Add +1 to Variable
Else
Reset Variable

Golden Boy: (This one may accept two values, "3" for the chest and "6" for the stairs.)
* Check if Variable is 6

Win Stairs
Else
* Check if Variable is 3

Win Chest
Else
Reset Variable

Pay close attention and you'll see that this matches the second image I sent to you, the one describing every single event.
The right angel was good in the first image you sent me. You only have to check the variable once.

I'll give you an example of the stairs password:

Spoiler
Right Angel:
* Check if Variable is 0

Set Variable to 4
Else
Reset Variable

Left Angel:
* Check if Variable is 4

Add +1 to Variable
Else
Reset Variable

Priest: (This one may accept two values, "2" for the chest and "5" for the stairs.)
* Check if Variable is 5

Add +1 to Variable
Else
* Check if Variable is 2

Add +1 to Variable
Else
Reset Variable

Golden Boy: (This one may accept two values, "3" for the chest and "6" for the stairs.)
* Check if Variable is 6

Win Stairs
Else
* Check if Variable is 3

Win Chest
Else
Reset Variable

Pay close attention and you'll see that this matches the second image I sent to you, the one describing every single event.
Ok, I set it up and got the dragon one set up as well. It works like a charm. Thank you so much for your help. Sorry if I made this seem more complicated than it needed to be.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/statue-code.132900/