Can't pause

Get help using Construct 2

Post » Sat Sep 17, 2011 10:50 pm

Can't figure out how to make a pause.


"On any key pressed - Set time scale to 0" ???
http://dl.dropbox.com/u/3232744/pause/index.html
http://dl.dropbox.com/u/3232744/pause.capx



Thank You.
B
79
S
32
G
23
Posts: 119
Reputation: 14,937

Post » Sat Sep 17, 2011 11:17 pm

You should always include delta-time (the time since the last tick) in movements. For example, use

Rotate 90 * dt degrees clockwise

If you rotate 1 degree per tick like you had, at 10fps it rotates 10 degrees a second, and at 60fps it rotates 60 degrees a second (6 times faster). So to make games move at the same rate you always need to use dt. In the above example, it rotates 90 degrees per second regardless of the framerate.

When you set the timescale to 0, dt becomes 0 as well, so movements using dt also stop.Ashley2011-09-17 23:17:28
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 13 guests