Pausing a game

New releases and general discussions.

Post » Sat Jan 23, 2010 1:22 am

Hi

I have a question, is there a possibility to pause a game when the user press a key? and How I could do that?
B
1
G
2
Posts: 6
Reputation: 637

Post » Sat Jan 23, 2010 1:26 am

[code:2tprd5fs]Key "pause" is pressed > Set Timescale to 0.[/code:2tprd5fs]

Done. But this only works if you're are using TimeDelta, (If you're using a behaviour for movement, you shouldn't worry about this).
B
2
S
1
G
3
Posts: 118
Reputation: 1,336

Post » Sat Jan 23, 2010 2:47 pm

It works thank you ShadeKirby500
B
1
G
2
Posts: 6
Reputation: 637

Post » Sat Jan 23, 2010 10:12 pm

I have another doubt. It works the last method for pausing the game, but when the game is "frozen", I mean, that a pause method is working when I hit any other key of the keyboard, the game moves a little bit, I mean, it moves 1 millisecond or something like that every time I hit a key.

is there other way to implement a effective pausing method?
B
1
G
2
Posts: 6
Reputation: 637

Post » Sun Jan 24, 2010 12:13 am

You must have an event that changes the timescale when you press a key, or your movements are tick-based instead of time based. Setting the timescale to 0 doesn't do that by itself, so you should have another look at your events.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests