0 Favourites

How do I get always same timed value [SOLVED]

  • capx:

    Im working on some playback function where everything works smoothly cept one thing...

    So i made a simple example to go directly to the issue.

    Its simple, you hold the SPACE button and it will add each 0.1 seconds one variable for 5 seconds. On release the values reset.

    When starting the "game" on first try most of the time the value hits 45, the next tries hit value 41 almost always.

    By refreshing the entire game i get the same thing, on first try it counts bigger value than on the other tries.

    This causes huge differences in bigger timed calculations. What can i do to ensure that the result remains always the same?

    Here is also the more complex version

    capx:

    you go to the green object and press space to trigger the recording. After its done you hold down the C button to have the blue one repeat what you did. On first try it shows 452 and on any other tries its always 402 even when i start recording another movement. It always happens on the first try when starting the game.

  • Hey Miu,

    There is a few different ways you could time it but why not keep it simple and instead of using 'timer < 5' switch it to 'variable1<45'. Then it will always be consistent.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hey Miu,

    There is a few different ways you could time it but why not keep it simple and instead of using 'timer < 5' switch it to 'variable1<45'. Then it will always be consistent.

    great, that actually fixed it! Thankyou very much

  • My pleasure

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