Non-TimeScaled TimeDelta Expression

This forum is currently in read-only mode.
From the Asset Store
Add this awesome sound effects to make your visual novel come to life!
  • I'm pretty sure this would be possible to implement, but correct me if I'm wrong. I think it would be pretty sweet if we could get a TimeDelta expression that isn't affected by the TimeScale. This could be helpful for pause screens with moving elements.

    Maybe it doesn't even have to be a separate expression, maybe you could just put TimeDelta(1) and it would deliver a non-TimeScaled value. That could keep people looking through the expressions list from getting confused between the two.

    Possible? Yes? No? Chickens?

  • it's early in the morn' so I'd double check and test it

    but

    timedelta/timescale

    should work

  • I thought about that, but if you're timescale is set to 0, then you'd be dividing by zero.

  • Possible? Yes? No? Chickens?

    Chickens. Save the timescale, set the timescale to 1, and immediately timedelta begins returning non-scaled values, which you can then use on some custom movement events (for example). Set the timescale back to its old value at the end of the events, and then you have a loaf of events inbetween which use an unscaled timedelta.

  • Chickens. Save the timescale, set the timescale to 1, and immediately timedelta begins returning non-scaled values, which you can then use on some custom movement events (for example). Set the timescale back to its old value at the end of the events, and then you have a loaf of events inbetween which use an unscaled timedelta.

    Ah, nifty. I hadn't even considered doing that. Thanks for the tip.

  • I'm not entirely sure if this is what you wanted, but for the 'bullet time/super speed' demo I made ages ago, I just used (1 / timescale) to make something look as though it wasn't affected by timedelta and slowing down and all that.

    For example:

    global TimeFix = (1 / timescale)

    .x = (.x + MovementOffset * timedelta) * global('TimeFix')

    Something along those lines. I'll post the cap

    http://files.getdropbox.com/u/1289341/SuperSpeed.cap

    (I'm also experimenting with that listbox replay method I believe Linkman made up ages ago too, I just wanted a way to do everything in slow mo, then replay it in realtime)

  • I thought about that, but if you're timescale is set to 0, then you'd be dividing by zero.

    so why not if timescale = 0

    then 0

    else

    the expression

  • so why not if timescale = 0

    then 0

    else

    the expression

    because 0 is not the original unscaled timedelta

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the timescale is 0, then timedelta is 0 and it's impossible to retrieve the unscaled timedelta - unless you use my method

  • > Possible? Yes? No? Chickens?

    >

    Chickens. Save the timescale, set the timescale to 1, and immediately timedelta begins returning non-scaled values, which you can then use on some custom movement events (for example). Set the timescale back to its old value at the end of the events, and then you have a loaf of events inbetween which use an unscaled timedelta.

    I was wondering about the same as the thread starter today to have timedelta'd actions while the game is paused and this solved my problems easily. I just put "set timescale to 1.0" to the beginning of the actions, did all my timedelta stuff in the middle, and in the end I just set the timescale to 0 and voila, timedelta stuff working like it should while the game is paused!

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