I think my game is stuck in a loop

Okay so I tried the method i used on the faux menu because that worked but it won't work for what im trying to do now which is activate a movement route when a button is clicked. It just takes me to the else. can you help me out here is a screen shot of the event

Spoiler: The source of my headache right now
1623534656058.png

Edit: Also it doesn't wait til the box is closed before you hit the button to do the thing, how do i stop that would I use wait?
the button press in the conditional branch only checks if the button is pressed during a single frame, the frame when the event runs.
to wait for the press it needs to be inside a parallel or a loop.

also, please use better titles - everyone around here is looking for help and such titles are useless, better tell us what kind of help you're looking for in the title.
okay thank you and i'm sorry i'll think up a better title while i see if this works

Edit: @Andar I just realized I do not know how I would set that up could you help me with an example?
the loop should have two options checked by conditional branches that will contain a break loop command plus whatever the options are.

the first one is the button pressed, which gives a signal or whatever to show that the button has been pressed (for example turning a switch) before breaking the loop.

the other option would be a timeout, counting a variable up by +1 each loop until it is high enoug to cause the timeout break loop
E.g. something like this:

◆Text:None, None, Window, Bottom : :Press the dash/shift key to continue. ◆Loop ◆If:Button [Shift] is being pressed ◆Break Loop ◆ :Else ◆Comment:Check again next frame ◆Wait:1 frame ◆ :End ◆ :Repeat Above ◆Text:None, None, Window, Bottom : :Great, now you're ready to save the world!​

The Wait command is very important here, otherwise the game will try to "complete" the loop in a single frame...which is pointless because the input only updates once per frame. 😅
E.g. something like this:

◆Text:None, None, Window, Bottom[/INDENT] [INDENT]: :Press the dash/shift key to continue.[/INDENT] [INDENT]◆Loop[/INDENT] [INDENT] ◆If:Button [Shift] is being pressed[/INDENT] [INDENT] ◆Break Loop[/INDENT] [INDENT] ◆[/INDENT] [INDENT] :Else[/INDENT] [INDENT] ◆Comment:Check again next frame[/INDENT] [INDENT] ◆Wait:1 frame[/INDENT] [INDENT] ◆[/INDENT] [INDENT] :End[/INDENT] [INDENT] ◆[/INDENT] [INDENT]:Repeat Above[/INDENT] [INDENT]◆Text:None, None, Window, Bottom[/INDENT] [INDENT]: :Great, now you're ready to save the world!​

The Wait command is very important here, otherwise the game will try to "complete" the loop in a single frame...which is pointless because the input only updates once per frame. 😅
okay so it works but you have to hit the s button super quick and what if i put wait under break loop? i don't know how long to make it wait is the thing
okay so it works but you have to hit the s button super quick and what if i put wait under break loop? i don't know how long to make it wait is the thing
I'm not sure how to interpret this. Are you talking about:
  1. How long the button has to be held?
  2. A delay before and/or after the input check?
  3. Something else?
Break Loop will immediately jump to the command after the end of the loop: Show Text in this case.
@caethyril 2 a delay after the text so they have time to press the button before the wrong button thing comes up
Oh, I see! As-is, the example I posted should wait forever until the player presses the right button.

This can be used to check if any button is being pressed in Conditional Branch > Script:
JavaScript:
Object.values(Input.keyMapper).some(key => Input.isPressed(key))
Might be helpful if you wanted to wait until any key is pressed, then fail if it's not the correct key, e.g.
Spoiler: Wait for any input, fail if wrong
Code:
◆Comment:Wait for no keys pressed
◆Loop
  ◆If:Script:Object.values(Input.keyMapper).some(key => Input.isPressed(key))
    ◆Comment:Some key is being pressed
    ◆Wait:1 frame
    ◆
  :Else
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above
◆Comment:Wait for any key press
◆Loop
  ◆If:Script:Object.values(Input.keyMapper).some(key => Input.isPressed(key))
    ◆If:Button [Down] is being pressed
      ◆Text:None, None, Window, Bottom
      :    :Yay
      ◆Comment:Success
      ◆
    :Else
      ◆Text:None, None, Window, Bottom
      :    :Nay
      ◆Comment:Fail
      ◆
    :End
    ◆Break Loop
    ◆
  :Else
    ◆Wait:1 frame
    ◆
  :End
  ◆
:Repeat Above

To add a timeout instead (or as well?), you can use a variable to count down the frames and show the "fail" message when it hits 0, e.g.
Spoiler: Press within in X frames
Code:
◆Comment:5 seconds = 300 frames to press the button
◆Control Variables:#0023 time = 300
◆Comment:Ask for input
◆Text:None, None, Window, Bottom
:    :Press [down] to walk.
◆Comment:Check for input
◆Loop
  ◆If:Button [Down] is being pressed
    ◆Comment:Success!
    ◆Break Loop
    ◆
  :Else
    ◆Comment:1 frame closer to failure
    ◆Control Variables:#0023 time -= 1
    ◆If:time ≤ 0
      ◆Comment:Time's up!
      ◆Break Loop
      ◆
    :Else
      ◆Comment:Check again next frame
      ◆Wait:1 frame
      ◆
    :End
    ◆
  :End
  ◆
:Repeat Above
◆Comment:Say something
◆If:time > 0
  ◆Text:None, None, Window, Bottom
  :    :Congratulations! You learned the "Walk" skill!
  ◆
:Else
  ◆Text:None, None, Window, Bottom
  :    :OK I guess you're staying here.
  ◆
:End
For timed stuff you might find this tutorial helpful~

(It's ~01:40 here so I'm going to bed now.)​
@caethyril I really appreciate the help but it's just not working
Thread closed

@alltheyuriz we usually like it if people who got solutions elsewhere post the final solution before having the thread closed. Means other people who have a similar issue and find your thread here can see what they need to do.

Original thread: https://forums.rpgmakerweb.com/threads/i-think-my-game-is-stuck-in-a-loop.137409/