Stop Physics without using Set Time Scale

Get help using Construct 2

Post » Mon Nov 11, 2013 6:35 am

Hi everyone,

Is there a way to "pause" objects moving with physics without using the set time scale. The reason for not using this is because I am using set time scale for an effect in the game, so I can't use it to pause, or it will mess up the duration for the set time scale effect I have.

I am using global variables to pause it, but when I use the disable physics event, the objects still falls down, just very very slowly.

Any ideas on what I can do?
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Mon Nov 11, 2013 8:58 am

Sorry everyone, I was able to find this post just now.

http://www.scirra.com/forum/how-do-i-pause-physics-for-an-object_topic49603.html

This helped me achieve what I wanted, except for one function. When I unpause, the force of the object is from where the pause stopped it, not from where it initially was.

There is a capx here.
https://www.dropbox.com/s/oxnz4lq0c1b7jvj/physicspausetest.capx

I am not sure which event in physics to save and set to get the initial force.
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Tue Nov 12, 2013 7:52 pm

pausePhysics.capx
Works ok for me (probably have to set to Movable before doing everything else)
Last edited by Yann on Sun Sep 14, 2014 7:13 pm, edited 1 time in total.
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Post » Wed Nov 13, 2013 6:27 am

Hi @Yann. Thanks, you are right, moving the set to movable to the top did the difference. And thank you for your capx. Haha learning new and more effective ways to get things done. Thanks again!
B
46
S
23
G
31
Posts: 693
Reputation: 20,637


Return to How do I....?

Who is online

Users browsing this forum: Laurent, plinkie and 22 guests