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
8
G
7
Posts: 756
Reputation: 7,222

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 Image
B
164
S
49
G
114
Posts: 7,673
Reputation: 79,545

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
8
G
7
Posts: 756
Reputation: 7,222

Post » Thu Mar 14, 2013 8:30 pm

Oh , that might come useful !
B
35
S
16
G
16
Posts: 2,223
Reputation: 16,601

Post » Thu Mar 14, 2013 8:32 pm

Oh , that might come useful !
B
35
S
16
G
16
Posts: 2,223
Reputation: 16,601


Return to How do I....?

Who is online

Users browsing this forum: oddreal, SEGamestudio and 1 guest