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

Get help using Construct 2

Post » Thu Mar 19, 2015 4:27 am

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.

Code: Select all
FadeOutCounter = 100;
FadeOutSpeed = 0.009;

    if FadeOutCounter > 0
        ButtonOpacity = ButtonOpacity - 1;
        Subtract 1 from FadeOutCounter;
        Wait FadeOutSpeed seconds;
        Call FadeOutButtonRow()
    if FadeOutCounter <= 0
        break from function;

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?
Posts: 31
Reputation: 703

Return to How do I....?

Who is online

Users browsing this forum: luckyrawatlucky, The Mnk and 14 guests