How to create a sequence of buttons..?

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.
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
I read it 3 times and still didin't get it. lol

Anyway, are you trying to do that: https://atelierrgss.wordpress.com/rgss3-chain-commands-m/, but with events?

ll I need is for it to be known when the correct button is pressed and when it is not.

I'm not with VXAce installed, but can't you just use the Conditional Branch "Buttom x is pressed"?
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...
I read it 3 times and still didin't get it. lol

Anyway, are you trying to do that: https://atelierrgss.wordpress.com/rgss3-chain-commands-m/, but with events?



I'm not with VXAce installed, but can't you just use the Conditional Branch "Buttom x is pressed"?
Oh yes, that also works, I already tried it before. But I wanted to do this without scripts.
Thanks anyway ... I know it's hard to understand xD
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.
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.
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.
Yeah, it kinda will, but you've got to do a little bit more.

Something like this?
https://forums.rpgmakerweb.com/inde...-press-buttons-in-correct-order-puzzle.70966/
Yeah, it kinda will, but you've got to do a little bit more.

Something like this?
https://forums.rpgmakerweb.com/inde...-press-buttons-in-correct-order-puzzle.70966/
Yeah, this works perfectly thank u so much, and the others for trying to help me.
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.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-create-a-sequence-of-buttons.92676/