Object movement via dt and lerp with 0 timescale

Get help using Construct 2

Post » Thu Mar 14, 2013 6:33 pm

I've got a problem where I want to have neat, sliding menu icons that appear when I pause the game. Problem is that pausing (setting time scale to 0) breaks their movement, which is done via lerp(object.x, targetX, dt). I've tried setting the object timescales seperately to 1 after pause event, but it still doesn't seem to work. I am guessing dt is taken from game timescale?

What would be the simple way of going around this problem?

I'm going 100% natural here, so no plugins allowed! :)
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Thu Mar 14, 2013 6:44 pm

Try setting the individual objects dt to 0 under the system actions.
Then use that objects dt in your expression "object.dt"
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216

Post » Thu Mar 14, 2013 6:46 pm

[QUOTE=newt] Try setting the individual objects dt to 0 under the system actions.
Then use that objects dt in your expression "object.dt"[/QUOTE]

Thanks @newt, I just read that piece in the manual as well! :)

Here is the quote for anyone that might come looking for the info:

"Objects have their own dt expression (e.g. Player.dt) which you must use instead of the system dt for all motion relating to that object."
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Thu Mar 14, 2013 8:30 pm

Oh , that might come useful !
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,461

Post » Thu Mar 14, 2013 8:32 pm

Oh , that might come useful !
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,461


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], biasaur, Unconnected and 9 guests