Make "Every X Seconds" not be affected by time scale

0 favourites
  • 5 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Basically theres a timer in my game, that goes up by 1 every 1.0 seconds, but the player also has the ability to make time scale 0.1, but this also slows down the increment of my time variable. How do i make it so time goes up by 1 every real second? so that even when time is slowed, it still counts normally. I tried making it so when time is slowed it adds 1 to time every 0.1 seconds, but if i spam the slow down ability it add basically everytime i use it, making the time incorrect.

  • You could use the wallclocktime expression to get a time unaffected by time scale. Store the wallclocktime when the timer starts, and compare the current wallclocktime to the stored value to determine how much time has passed.

    Alternatively you could you make a family of objects to be slowed down, and set the object time scale for that family instead of changing the global time scale.

  • You could use the wallclocktime expression to get a time unaffected by time scale. Store the wallclocktime when the timer starts, and compare the current wallclocktime to the stored value to determine how much time has passed.

    Alternatively you could you make a family of objects to be slowed down, and set the object time scale for that family instead of changing the global time scale.

    I can't seem to find the wallclocktime anywhere.

    Also just setting the player time scale didn't seem to work, he still flies around the screen at normal speed

  • Pretty sure it's in there. It's a system value.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pretty sure it's in there. It's a system value.

    That works quite well, thank you

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