Pause Menu with one/same Button

Get help using Construct 2

Post » Sun Mar 02, 2014 9:27 pm

I want Pause the Game with P. How make that Construct 2 know that First Press = Open Pause Menu and Second Press = Close Pause Menu.

Thank you for every Help :geek:
Last edited by TheDarkImperial on Tue Mar 04, 2014 12:16 pm, edited 1 time in total.
B
7
Posts: 61
Reputation: 393

Post » Mon Mar 03, 2014 9:52 am

Any suggestions ?
B
7
Posts: 61
Reputation: 393

Post » Mon Mar 03, 2014 4:02 pm

a litte Push
B
7
Posts: 61
Reputation: 393

Post » Mon Mar 03, 2014 4:03 pm

Perhaps put all the game events into a group,and disable it.Try!
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Mon Mar 03, 2014 5:19 pm

Yea but how make that i can activate and deactivate with the "same Button" ?
B
7
Posts: 61
Reputation: 393

Post » Tue Mar 04, 2014 10:09 am

Does that work?(I have never used pause before)
If so,
Make a global variable called "Pause" initial value =0
When clicked on pause button,make it 1
If 1 AND clicked on pause button,make it 0

If "Pause"=1 ,Disable group
If "Pause"=0,Enable group
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Tue Mar 04, 2014 12:15 pm

Doc Ai wrote:Does that work?(I have never used pause before)
If so,
Make a global variable called "Pause" initial value =0
When clicked on pause button,make it 1
If 1 AND clicked on pause button,make it 0

If "Pause"=1 ,Disable group
If "Pause"=0,Enable group


Hmm nothing happened, also if i only use P pressed = Timescale 0. The Game just run normaly.
B
7
Posts: 61
Reputation: 393

Post » Tue Mar 04, 2014 12:37 pm

I'm also curious about this. I fiddled with it a bit, trying different things but none of them worked.

Edit: I think what is happening, is that the program is recognizing "P" (or whatever button you use) being pushed constantly, so you only "see" the last step. I'm still at a loss on how to delay the recognition long enough to halt the cycle, that or make it so it only recognizes a button push once. I tried "System > Trigger once while true" to no avail. I'll give "System > Every X seconds" a go and see what happens.

Edit2: No luck.
B
5
S
1
Posts: 31
Reputation: 437

Post » Tue Mar 04, 2014 3:08 pm

See this capx.When p is pressed,Game is paused.
When R is pressed,Game is resumed.
You do not have the required permissions to view the files attached to this post.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Tue Mar 04, 2014 4:25 pm

Thanks for the demo, however I think OP (and what I was looking for) was P to act as a toggle for Pause.
B
5
S
1
Posts: 31
Reputation: 437

Next

Return to How do I....?

Who is online

Users browsing this forum: Microbex, PROxMTswatTR and 15 guests