How do I "wait" independent of the time scale

Get help using Construct 2

Post » Wed May 11, 2016 11:09 pm

Hi, about wait and timeScale, how I can make wait is not modified after changing timeScale?

With timeScale = 1

Wait 1 second = 1 second - ok

But with timeScale = 0.5

Wait 1 second = 2 seconds - ?

"wait" depends on the time scale by what I see, is this correct ?.
B
29
S
12
G
21
Posts: 788
Reputation: 14,427

Post » Wed May 11, 2016 11:21 pm

0.5 is half as fast.
2x is twice as fast.
It just looks like it's related, but its not.
Image ImageImage
B
169
S
50
G
170
Posts: 8,291
Reputation: 108,726

Post » Wed May 11, 2016 11:30 pm

I'm not sure I follow.

Look at this example, I use wait 1 second but spend 2 seconds until ending wait.

https://dl.dropboxusercontent.com/u/60803633/test10.capx

I just want to wait 1 second using "wait 1 second"
regardless of the timescale.
B
29
S
12
G
21
Posts: 788
Reputation: 14,427

Post » Wed May 11, 2016 11:36 pm

You can timescale only the moving objects with 'set object time scale'. That way the system is not effected. Timers still can be used when the behaviour is attached to a non t-scaled object.

Or make you own clock based on the expression wallclocktime.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed May 11, 2016 11:46 pm

Ok, use a timer using as reference WALLCLOCKTIME could be a solution.
Thanks.
B
29
S
12
G
21
Posts: 788
Reputation: 14,427

Post » Wed May 11, 2016 11:50 pm

Looks like time, and wallclocktime are inverted @Ashley
But wait is still not effected only wallclocktime is
2 seconds becomes 4 when timescale is half as fast.
Image ImageImage
B
169
S
50
G
170
Posts: 8,291
Reputation: 108,726

Post » Wed May 11, 2016 11:54 pm

@newt, that is new to me. So far all my wallclocktimes been real time ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu May 12, 2016 1:49 am

Change the example capx to time, and its shows un dt'd time, which is what wallclocktime is supposed to be.
Image ImageImage
B
169
S
50
G
170
Posts: 8,291
Reputation: 108,726

Post » Thu May 12, 2016 4:12 am

Just use:
wait timescale seconds

and the wait time will be one actual second as long as the timescale isn't 0.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 62 guests