[Resolved] Wait until action?

I’m currently making my first develop project. I currently have three scenes. One is the opening menu screen of my project, the next is the settings page, and the next is the game. I connected a playstation controller using one of the extensions and that’s working marvellously. The first menu scene has two sprites, one sprite acts as a start button that takes you to the scene with the game, while the other button takes you to the scene with the settings menu. I have the player press the ‘up’ or ‘down’ buttons to select a button, and then press the ‘x’ button to actually press it. This is where the problems arise. Since the X button is being used in both scenes, when the player clicks the ‘X’ button to go to the settings scene, the program thinks right away that the player has hit the ‘X’ button to go back to the previous scene right away. In other programs I’ve used, this sort of problem can be fixed by ‘wait until not: pressed.’ So the program would wait until the button isn’t pressed. I’m not quite sure what the equivalent to that would be in GDevelop. The trigger only once command doesn’t solve this because it triggers the command once in one scene then triggers the other command once in the other scene. Any assistance would be greatly appreciated, and I can post screenshots if needed.

You could try the “release Key/Key released” Event.

There is no key release for the game controller function. I suppose the invert condition would be the same though. How could I use that though? I can’t have the button pressed and button released at the same time.

I figured it out. What I needed to do was set a variable to 1 if button x pressed, then in a separate event, I had if button x was released and the variable = 1, then it would move screen. Thank you for your help!

1 Like