Wait 2.2 seconds waits 6 seconds

Discussion and feedback on Construct 2

Post » Sun Sep 23, 2012 9:42 pm

I looked around the forums for the answer to this because I remember a while ago reading that Wait might not be reliable.

But now I can't find any posts about it.

What would cause my wait command to take longer than the seconds defined?

I found that it does this when I build a cocoon APK. Yet the launcher is fine. Could it be a CocoonJS problem?
B
22
S
7
G
3
Posts: 189
Reputation: 4,270

Post » Sun Sep 23, 2012 10:11 pm

The only thing which ought to do this is if you change the time scale. That also affects wait times. Otherwise, share a .capx!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Sep 24, 2012 12:46 am

Usually I use "wait 1000 * dt" or something, could you try that? If I'm not mistaken, you should use 300000 * dt to get 5 seconds (really unsure though).
B
106
S
35
G
37
Posts: 798
Reputation: 25,215

Post » Mon Sep 24, 2012 12:49 am

@andreyin, I don't think that's a good idea! I'm pretty sure @Ashley built this into the system, which means you are multiplying by dt squared!
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Sep 24, 2012 12:51 am

Oh, I didn't know! Was it always like that?
B
106
S
35
G
37
Posts: 798
Reputation: 25,215

Post » Mon Sep 24, 2012 12:59 am

@andreyin - that is definitely wrong! 'Wait' already takes a time in seconds, so there's no need to use dt. Your examples will have a strange and probably random effect on the wait times.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Sep 24, 2012 5:17 am

So far I haven't had any wait problems.
Could it be what Ashley said? That you had adjusted your time scale? Since time scale is the only thing that could be adjusting it relative to your delta time.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Mon Sep 24, 2012 6:59 am

Hey guys, thanks for the replies.

The time scale is normal. I think it might be a CocoonJS problem. I'll build a sample capx copying the problem and see if it behaves the same as my main project.
B
22
S
7
G
3
Posts: 189
Reputation: 4,270

Post » Wed Oct 03, 2012 10:25 am

I did a test. Looks like the game lags while loading assets. I play an intro sequence that overlays the loading screen, and these frames need to wait specific times before changing.

I made a "hack" on the load screen and modified the time scale to counter the slowness.
B
22
S
7
G
3
Posts: 189
Reputation: 4,270


Return to Construct 2 General

Who is online

Users browsing this forum: pablo7 and 16 guests