How to create a sequence of buttons..?

ADAVEL

Villager
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
First of all, a warm greeting to the entire community. I hope you are fine.


Ok, to the point. I've been trying for a few days to create a sequence of buttons. A button is shown on the screen that you must press (example, button ''A''). When pressed, another button will be displayed immediately (example, button ''B'')
When you finish pressing them, another event that ends with the sequence will be activated.
However, if you do not press the correct button, you will have to start the sequence again.

I was able to achieve it by means of a variable, that when the '' Up '' button is pressed, +2 is added to the variable, which is called '' Button ''.
also a common event initiated in parallel is active, which contains 12 conditional separations per button, which when pressed, you add +2 to the same variable '' Button ''.

If you press the '' Up '' button, +4 will be added to the variable, and it will recognize that the correct button is pressed. But if you press any other button and you add +2 to the variable, a conditional separation will be activated when the variable has only 2 digits, then the wrong button will have been pressed

The only problem is that when I press the correct button and (although 4 digits should be added to the variable, so that it is recognized as the correct button) the conditional separation is also activated, which indicates that when the variable has 2 digits, the wrong button is being pressed.

I hope to give me to understand, I do not know what to do to this variable and basically all I need is for it to be known when the correct button is pressed and when it is not.
 

Kato-A

Artist and developer
Veteran
Joined
Feb 9, 2017
Messages
108
Reaction score
138
First Language
Spanish
Primarily Uses
RMMV
Make it easy, when you press the correct button add 1 to the variable, went is Wrong add anything
and at the end make
If variable x is equal at: (the correct number) then: (the correct events happen)
If not: (the bad event happen)
If you want do that went you press the wrong button the sequence start again just put a label.
I think you're making more complicate
 

ADAVEL

Villager
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Make it easy, when you press the correct button add 1 to the variable, went is Wrong add anything
and at the end make
If variable x is equal at: (the correct number) then: (the correct events happen)
If not: (the bad event happen)
If you want do that went you press the wrong button the sequence start again just put a label.
I think you're making more complicate
But that is exactly what I did when I changed the value of the variable by pressing the correct button and it continued to indicate that I pressed the wrong button. I think it's not that simple...
 

ADAVEL

Villager
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
It might help if we could see your event so that we can check over your commands. Please post a screenshot. Do not crop it, as we need to see all the conditions and tabs. Also, please use Alt+PrtSc so that the shot is only of the active window, not your whole desktop. It makes it much easier to read.

Thanks.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
But that is exactly what I did when I changed the value of the variable by pressing the correct button and it continued to indicate that I pressed the wrong button. I think it's not that simple...
No, you did not what was described.
From your description you added different numbers to the variable depending on which button is pressed, and then check the value to determine the correct button. That will never work.

What the other poster described is to first check if the correct button is pressed, and then always add +1 only if the button is correct, and always add only one no matter which button.

You can not combine the check for which button with the counter, that will always be problematical.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The only thing you were missing from your original idea was that you had to nudge the digits along before adding the next one, so you could keep track of what order they'd been pressed in. Otherwise, doing a +1 and then a +2 would give you the same result as if you'd done a +2 then a +1.
 

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

Latest Threads

Latest Posts

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,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top