Need help with a puzzle event [Solved!]

Khaz

Learning Game Maker
Veteran
Joined
Dec 11, 2012
Messages
44
Reaction score
6
First Language
Finnish
Primarily Uses
RMVXA
Hey.

For a good while now, I've been trying to make this puzzle/riddle event work on my project and have been going over different ways using conditional branches and switches ( I attempted this with variables first and looked for tutorials, but I suppose I didn't look too well.. ) but I've been unable to get it work and I'm running out of ideas.

Help.jpg

As it can be seen on that image, that there are 5 hexagrams and a tablet thing with a hint to solving this riddle.

The way it's supposed to work is that you have to step on the 4 hexagrams surrounding the middle one in the correct order: Green, Red, Blue, Yellow, and then you step on the middle which triggers an event of completing the riddle.

Once you step on one of the hexagrams, it's supposed to light up, showing that you have activated it and then you proceed to step on another one, however if they are the incorrect ones, they're supposed to return normal.

For example, if you stepped on the Blue hexagram, it should light up. Then if you step on say the Red one, then the Blue one is supposed to return back to being inactive.

Similary, if you step the Green one and Red one in the correct order as you're meant to, then you step on the Yellow one, both of the two are meant to return back to being inactive.

The middle one is merely supposed to give you a message/hint that you're supposed to work with the four other ones surrounding it before you can step on that one.

My problem actually is that when I step on for example the Blue one and it lights up, then say, the Red one, they both light up and continue to do so ( as I have set Repeat on their move route ) but I've been unable to make them go back inactive once lighted up despite attempting to turn off the switch that activates the conditional branch.

I can provide a screenshot of how I've made the event on one of the hexagrams if that's needed.

Any help would be appreciated on this.

Thank you in advance. :)
 
Last edited by a moderator:

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Gimme a moment to make the event and screen shoot it.

I might add the answer on THIS reply, so I won't double post.

I am on it right now!
 
Last edited by a moderator:

C-C-C-Cashmere (old)

Resident Weirdo
Veteran
Joined
Mar 7, 2014
Messages
832
Reaction score
341
First Language
English
Primarily Uses
So what you do is you is you have a "progress" variable, initialized at 0. Then you have player touch events on red, blue, and yellow that these are not the right switches. If you player touch the green event, then add 1 to "progress" variable.

Create a page 2 for each color that has the conditional variable "progress" at least 1. Then you can repeat the process. If you step on any other event but the one you must step on, "progress" is set to 0. Otherwise it is incremented by 1. Repeat this until you have the whole thing done.
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Get this! You will understand how it works.

https://www.dropbox.com/s/y0jgupj6u5hz30i/Supporting.zip?dl=0

Actually if you don't understand what I did ask anything you want.

You will have to do it a little more complex (buttons pressable as wrong) adding some event pages.

Wanted to keep it simple so you can understand it.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Actually, Dreadshadow, your solution is far too complex.


All you need is a single variable for the "steps" of the riddle.


Start with a table (on paper or somewhere else for planning) consisting of a variable "step" and the status for all buttons/hexagrams.


Step = 0 is everything off.


Step = 1 is the first hex lit, everything else off


Step = 2 is the first and second hex lit, everything else off


and so on until


Step = 5 - riddle solved, all lit.


now you need exactly two pages for each hex, all almost identical.


The first page of all events has to consist of one conditional branch only, no condition, set to below character and player touch.


The conditional branch checks the step variable for the number below the correct step. If the yellow hex is the first to be stepped on, it needs to check for step = 0. If the blue is the fourth to be stepped on, it needs to check for step = 3.


In the case of the result true, add one to the step variable


In the case of the result false, set the step-variable back to zero.


The second page of all events should have the picture of the lit hexagram, and be conditioned to the step-variable at the step where it should be lit (1 in case of yellow in the example above, 4 in case of blue in the example above.


NO content on the second page in any of the hex events.


Finished - if you don't made a mistake with the numbers, it will work as you intended - and have something conditioned on variable step = 5 to check if it's solved.
 
Last edited by a moderator:

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
Yes indeed. For some reason I didn't thought of variable manipulation.

Maybe because I might thought at some point that it could confuse @Khaz.

I used only whatever was stated that was known.

Oh well. Good answer and indeed mine is TOO complex to be done while using a variable makes it easier indeed.
 

Khaz

Learning Game Maker
Veteran
Joined
Dec 11, 2012
Messages
44
Reaction score
6
First Language
Finnish
Primarily Uses
RMVXA
Get this! You will understand how it works.

https://www.dropbox.com/s/y0jgupj6u5hz30i/Supporting.zip?dl=0

Actually if you don't understand what I did ask anything you want.

You will have to do it a little more complex (buttons pressable as wrong) adding some event pages.

Wanted to keep it simple so you can understand it.
Actually, your solution was quite simple, Dreadshadow and it helped me get the problem solved! Thank you so much!

As for the other solutions given, thank you very much for posting them! I think I will try them out on a seperate "project" for testing purposes for possible uses later on.

Thank you once again for the help! No need to fry my head over it anymore. :)
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
"Thank you once again for the help! No need to fry my head over it anymore. "

I will be honest with you Khaz.

I am glad my solution helped you figure out how to do stuff.

But what @Andar told you, was a better solution than mine.

The reason is because of the following example:

Imagine a riddle with 25 buttons. Same as that one, but with 20 more buttons.

Dealing with switches only, will be a nightmare. Trust me on this.

On the other hand, as @Andar said, using a simple variable, turning it to different value and checking on the event pages if the value is more than a certain number, that would turn a complex riddle into a made easy.

It was @Andar's instict as a good programmer and his high experience, that led him to say what he said.

And it was also my teacher instict that kept me isolated in switch use only.

Since it was the ONLY info I had for you. I thought "Ok he knows switches, I know that".

That is why I didn't involved variables. I was afraid you could get confused.

So I recoomend you to read @Andar's suggestion too.

You might need it later on another circumstance.

And also check out my signature.

I made a tutorial game on eventing that you might find helpful...

and...

I also got a link to @Andar's tutorials! ;)

He is awesome! :D
 

Khaz

Learning Game Maker
Veteran
Joined
Dec 11, 2012
Messages
44
Reaction score
6
First Language
Finnish
Primarily Uses
RMVXA
@Dreadshadow Thank you very much.

Yes, I am a bit new on variables still and haven't really used them, so honestly, they do confuse me a bit, but as mentioned, I will be putting on the side like a test project where I'll be trying out to see if I can get that solution by @Andar to work. It could very well come useful later in the game even in events that aren't too riddle-like as this one was.

I'll be sure to also check the tutorials from both of you in the case I'll need help with something ( for example variables! ) or just to become more knowledgeable in certain other commands and events and the like.

Thank you who replied to this post! It was greatly helpful! :D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,567
Latest member
sashalag
Top