How do I get everything to sync with delta time / timescale?

0 favourites
  • 1 posts
From the Asset Store
Sync animations, animation frames, mirror state, sounds and anything else using these methods.
  • I'm working on a contract game involving an NDA, so I regretfully cannot post the capx file.

    The game I'm working on involves buttons displayed, as well as those buttons moving and fading in and out. I achieve button movement (moving up and down) by adding and subtracting to their y value, waiting a specific amount of time, and calling the same function recursively until a condition is met. I do something similar when I fade the buttons in and out, only by affecting their opacity instead of their y value.

    Example:

    FadeOutCounter = 100;
    FadeOutSpeed = 0.009;
    
    FadeOutButtonRow()
    {
        if FadeOutCounter > 0
        {
            ButtonOpacity = ButtonOpacity - 1;
            Subtract 1 from FadeOutCounter;
            Wait FadeOutSpeed seconds;
            Call FadeOutButtonRow()
        }
        if FadeOutCounter <= 0
        {
            break from function;
        }
    }[/code:h1bnke6h]
    
    I'm trying to implement a fast-forward feature, so naturally I would increase the timescale.  When I do increase timescale, most of the game speeds up as desired, but not my custom movement and fading functions.  I tried to decrease the speed variables in conjunction with increasing the timescale (such as multiplying FadeOutSpeed * dt), but I observe zero visible change.
    
    Any suggestions for how to fix this and make everything fast-forward?
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)