Loop: Every tick ok, but not every x seconds

  • This is for a fuel bar. The 2.31 is the adjust for the size in pixels.

    Event: Repeat IntervalSize times

    Subevent: Every tick: Liquid(Sprite) - Action: Set size to (64, loopindex*2.31)

    It works but obviously too quick, the meter is from one position to another in a "blink".

    But if I change Every tick to let's say Every 0.2 seconds it won't work at all, the bar is still in the old position.

    Do you know why?

    Are there a way to do "Every 20th tick"?

    I have a feeling I am doing this wrong because tick is basically "always" and maybe not same thing as time, right?

    Thank you for reading. :)

  • have you tried with every 0.0166 (basically every tick in seconds), and checked if it still doesn't work?

    Are you also sure that the timescale is set to 1?

    Is the "ever x seconds" command linked to another context sensitive event?

  • It won't work! <img src="smileys/smiley18.gif" border="0" align="middle" /> Just like with seconds, no change.

  • Are you also sure that the timescale is set to 1?

    Is the "ever x seconds" command linked to another context sensitive event?

  • "Every" under a loop makes no sense. Loops run instantly without waiting. You probably want to put the loop under the "every" event instead, which means it will run the (complete) loop that often.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok I realize it now as you put it, Ashley! Sorry about that.

    But let's say "do this thing" and then "wait x seconds" in a loop should be theoretically sound? But it won't wait until x seconds have passed but go on to next iteration at once ignoring the wait time. Hmm.

    Ok what I wanted to do is resize a sprite a fixed amount over a period of time (so it is smoothly growing) and not instantly. Maybe loop is not the way to do?

  • Look at the LiteTween plugin

  • Looks nice! Thank you, blackhornet!

    Love this forum, so many helpful people!

  • Thank you again, Blackhornet for introducing litetween to me! It is PERFECT! I can see I am going to use it for many things.

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