How do I pause the game?

Get help using Construct 2

Post » Fri Jul 01, 2016 12:15 pm

Hello,
I tried to set the time scale to 0 and it doesn't work in my case.
While I know it is to stop time, how can I completely freeze the game buttons?
They can be pressed even if the game has a time scale of 0 and there are certain moment that I cannot place two buttons on top of each other on different layers.
Otherwise if you click credits for example it sends you to the credits layer then it automatically clicks back cuz it is on the same position.

I also tried to use variables to stop button clicking, but they can still be clicked.
B
24
S
7
G
1
Posts: 200
Reputation: 2,495

Post » Fri Jul 01, 2016 6:46 pm

Provide the capx file. Would be easy to solve all your queries
B
9
S
2
Posts: 76
Reputation: 739

Post » Fri Jul 01, 2016 7:08 pm

Never mind I already fixed it.
B
24
S
7
G
1
Posts: 200
Reputation: 2,495

Post » Wed Jul 27, 2016 1:48 am

GSquadron wrote:Never mind I already fixed it.


hello, im having the same issue, how do you fixed??
B
22
S
8
G
9
Posts: 11
Reputation: 6,041

Post » Wed Jul 27, 2016 2:18 am

Usually you can put all your input triggers in a group and enable/disable the group as you pause and unpause.
Mistakes were made.
B
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Post » Wed Jul 27, 2016 4:56 am

You can also have a compare condition, is timescale greater than 0. Adding this condition to your controls/inputs will mean they only work if timescale is not at 0.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393

Post » Wed Jul 27, 2016 9:39 am

@aspano81
The issue with my game wasn't the time scale, it was the player controls.
Whenever I pressed W the player moved by 5 pixels.
So it has nothing to do with time.
I just set a variable pause and I set it to 0 if player controls are normal or 1 if player controls are disabled.
B
24
S
7
G
1
Posts: 200
Reputation: 2,495

Post » Wed Jul 27, 2016 4:42 pm

thanks :)
i will try this
GSquadron wrote:@aspano81
The issue with my game wasn't the time scale, it was the player controls.
Whenever I pressed W the player moved by 5 pixels.
So it has nothing to do with time.
I just set a variable pause and I set it to 0 if player controls are normal or 1 if player controls are disabled.
B
22
S
8
G
9
Posts: 11
Reputation: 6,041

Post » Thu Jul 28, 2016 10:08 pm

so this weird thing is happening, i have in layer 6 the pause button a continue and an exit button, when the layout start that layer is hidden.

but for some reason even when its hidden i can click on the buttons, on the hidden layer, is possible to solve this?
B
22
S
8
G
9
Posts: 11
Reputation: 6,041

Post » Thu Jul 28, 2016 10:24 pm

Add the condition "layer is visible" to the relevant events.
Mistakes were made.
B
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Next

Return to How do I....?

Who is online

Users browsing this forum: zsoldiers and 6 guests