So I am trying to make a pause button when it’s pressed, it will pause the game and show a pause layer but can also be used to resume the game and hide the pause layer. I run into the problem of the pause layer showing the disappearing after one click.
That sound like you need to use a “Trigger once while true” with your click on the button conditions
I have the condition already in my script but it doesn’t work,
Can you provide a screen shot of the events?
The way the GDevelop will run this is:
- It looks at the first event. It sees Esc is pressed and pause = 0, so it sets pause to 1.
- It looks at the second event. It sees Esc is pressed and pause =1 (it was set it in the previous event), so it sets pause to 0.
I don’t think this is how you want it to happen, right? Try the following - it’ll give the result you’re after:
1 Like
I use the keypress delay timer.
obviously with each touch it resets the timer, so you have time to click and lift your finger