a matter of time.

This forum is currently in read-only mode.
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I have a number of instances, each has a variable called timer.

    I want this variable to count down every second for each instance, so i tried,

    for each object

    +timer > 0

    +every 1000ms > subtract 1 from timer value

    But what this does is goes through the instances one at a time, rather than doing them all together.

    If i remove the 'for each' condition, it now works but each instance is synchronized rather than counting down indpendantly of one another.

    Is it a bug, or am i doing something wrong?

    Thanks.

  • But what this does is goes through the instances one at a time, rather than doing them all together.

    What do you mean? What's wrong with that and what would you rather happen?

    You could try always subtracting TimeDelta from the private variable. You can round off the number when displaying it if you don't want the decimal point.

  • > But what this does is goes through the instances one at a time, rather than doing them all together.

    >

    What do you mean? What's wrong with that and what would you rather happen?

    They don't count down all at the same time, as i think they should. Instead it's like the instances are in a queue, when one instance reaches 0 another instances starts counting down, i want it to happen at the same time.

    Like i said removing the 'for if ' condition solves the problem but creates another, which is time is not independant for each instance. If one instance is counting down and another instance is triggered to start counting down a few moments later, the time is synchronized rather than acting independantly.

    Hope you get what i mean.

    Thanks.

  • Yeah, TimeDelta does this fine.

  • I can't open the file, it gives an error, 'expecting class Canimation but recieved Clayout'.

    You're probably using a newer version?

    Thanks.

  • Bah, I keep forgetting. I made it with 0.98.6 which isn't out yet

    It should be out tomorrow or the day after though, so you can try again then... besides, it's basically:

    + Always

    -> Subtract TimeDelta from variable 'time'

    Round it off to display it and you have a uniquely decreasing counter

  • yes that works perfectly thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bah, I keep forgetting. I made it with 0.98.6 which isn't out yet

    It should be out tomorrow or the day after though, so you can try again then... besides, it's basically:

    WHY??? WHY MUST YOU TORTURE ME WITH UPDATING THE CLASSROOM AGAIN BEFORE THE CLASS HAS EVEN STARTED??? lol j/k cant wait to see the new version

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