Hi everyone! So: I made an event that makes you play piano by pressing your pc keyboard keys. Now I want the event to end and to let you go on in the game once you play a sequence of notes. Do I just have to use variables and make lots of event pages or there is something that when I insert the correct sequence, it recognizes it?
Help with an event!
RPG Maker MV Supportthere are many possible solutions here, but each has its own advantages and disadvantages. Using different event pages is one option (which has the disadvantage of there being only a limited number of event pages).
Another option would be to compare the key and count up variables if correct and a few other possibilities.
Show us a screenshot of how you made that event and we can tell you which way would be the best to continue.
Another option would be to compare the key and count up variables if correct and a few other possibilities.
Show us a screenshot of how you made that event and we can tell you which way would be the best to continue.
I still have to add the "play sound effect" but it works.
when you edit the conditional branches to add the sound effects, do a few more steps:
add a second conditional branch inside each option checking a step-variable for the correct steps. Make sure that the "else" checkbox is active on them.
The else branch (which means incorrect note) should set the step variable to zero, resetting the sequence.
Now the part that is difficult to describe: the step check and counting up.
You need as many conditional branch commands as there are correct notes in the sequence. These commands need to be scattered into your structure, with one command for each correct key press. If a certain key needs to be pressed several times, then that segment needs multiple branches - one per number of correct presses.
Let's assume the correct sequence is "qete".
First key is q, so into the "keytrigger q" sequence you add a conditional branch
If step = 0 then step += 1 else
step = 0
Second and fourth key is e, so you'll need two conditional branches in the e-sequence
If step =1 then step +=1 else
if step = 3 then step +=1 else
step = 0
The third key is t, so into that section you'll get a
If step = 2 then step +=1 else
step = 0
After all sections, you add a final conditional branch
If step =4 then victory
The general formula is
if step = (current note step minus 1) then add one to step
check for all possible correct steps
if none is correct, the last else is to reset step = 0
I hope that is enough for you to understand, it's almost midnight here and I don't have enough time for a better description.
add a second conditional branch inside each option checking a step-variable for the correct steps. Make sure that the "else" checkbox is active on them.
The else branch (which means incorrect note) should set the step variable to zero, resetting the sequence.
Now the part that is difficult to describe: the step check and counting up.
You need as many conditional branch commands as there are correct notes in the sequence. These commands need to be scattered into your structure, with one command for each correct key press. If a certain key needs to be pressed several times, then that segment needs multiple branches - one per number of correct presses.
Let's assume the correct sequence is "qete".
First key is q, so into the "keytrigger q" sequence you add a conditional branch
If step = 0 then step += 1 else
step = 0
Second and fourth key is e, so you'll need two conditional branches in the e-sequence
If step =1 then step +=1 else
if step = 3 then step +=1 else
step = 0
The third key is t, so into that section you'll get a
If step = 2 then step +=1 else
step = 0
After all sections, you add a final conditional branch
If step =4 then victory
The general formula is
if step = (current note step minus 1) then add one to step
check for all possible correct steps
if none is correct, the last else is to reset step = 0
I hope that is enough for you to understand, it's almost midnight here and I don't have enough time for a better description.
I think i got it! Thanks a lot!
Original thread: https://forums.rpgmakerweb.com/threads/help-with-an-event.102564/