Trying to do stuff when time scale = 0

This forum is currently in read-only mode.
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • I'm setting time scale to 0 to pause my game. When the game is paused, I want to display an animated sprite. I also want to autoplay a sound.

    But setting time scale to 0 seems to cause most actions not to run.

    Playing music works but it causes lag and I want to avoid that.

    Is there any way around this problem?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When time scale is 0 you can still do a lot of manual manipulations of things. You can still move sprites by explicitly stating the pixel coordinates (though you don't get the benefit of timedelta), and you can still show animated sprites by manually setting the frame of the sprite. You would need to make your own series of events to do so though. Something like "+Every X Milliseconds -> Set animation frame to current frame + 1." You'll also need an extra event to check that it sets back to 1 when it reaches the end.

    As for the sound issue, I'm not entirely sure about that.

  • Here's a trick: Within the events you're running with Timescale set to 0, temporarily set Timescale to 1 and then you can use Timedelta as usual. Don't forget to set Timescale back to 0 once you're out of that block

  • Here's a trick: Within the events you're running with Timescale set to 0, temporarily set Timescale to 1 and then you can use Timedelta as usual. Don't forget to set Timescale back to 0 once you're out of that block

    I did not know that. That does sound like a handy trick

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