Innacurate time using "Every x second"?

0 favourites
  • 4 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hi folks!

    I'm trying to create a time bar for a turn-based game. However I've stumbled upon a problem that I don't know if its a bug, or I'm missing something.

    When I used "Every 1 second" things were fine. But for a 10 second turn, this bar will be pretty much useless (growing 10% at a time), so I decided to use "Every 0.1 second" - this way it would grow 1% at a time and reach the 100% nicely.

    But I noticed time wasn't accurate anymore.

    I went further and created a "Every 0.01 second" to check it out, and yes, it runs even slower. Tried sticking the magical "* dt" on the event part just to see if the numbers would at least even up, but it didn't work either.

    I made a demo test, using 5 seconds as the turn time:

    http://dl.dropbox.com/u/7324985/Every_Second_Test.capx

    I don't know if this is a bug - if the "Every Second" event allows me to use fractions of second, then I'd classify it as a bug - but what's the best way to solve this?! I wanted to keep the global variable CycleSeconds so I can easily change the turn's time.

    Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not sure but would it be more accurate if you would add dt on every step to CycleTest and then set the text to "Every 1 second: " & floor(CycleTest1)?

  • This is actually a bug which should be fixed in the next build.

    FIX] System 'Every X seconds' drifted off in accuracy over time, should be more accurate now

  • Great Ashley! Thanks!

    You can close the topic, move it to bugs...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)