0 Favourites

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

  • 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

  • Construct 3

    Buy Construct 3

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

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

  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
378 33,276
part12studios's avatar
part12studios
Unread hot topic
234 61,246
DARKSETH's avatar
DARKSETH
Unread hot topic
167 14,513
DMT2005's avatar
DMT2005