[Request] Timescale per action

I’d love to be able to set a custom timescale per action, instead of global. With the current implementation, if you slowdown the timescale, absolutely every scheduled callback is slowed down, but if you’ve got UI and gamelogic tied to the scheduler, this gets weird.

I’ve got Sprites who’s positions are updated via scheduled update at 60FPS but if the timescale is slown down, they are repositioned slower, since the scheduled update to move them is ran slower. If there’s a way to get around this, I’d like to know it.

I’d love to see something like ActionInterval::setTimeScale(float scale) that works on the fly without affecting the rest of the actions. Maybe even Node::setActionTimeScale(float scale) so that all the actions tied to this node are changed.

1 Like

Did you try using Speed action?
We recently used this for game simulation of 1x/2x speed and its working great.

1 Like

I hadn’t actually, thank you! Seems like it wouldn’t support toggleability, where if you made an action Speed’d up, you couldn’t slow it back down, although you could probably get pretty far with setInnerAction… I’ll keep looking into it, thanks!

I dont know your exact goal but as in my case we are handling speed-up and speed-down easily via toggle button. You just have to fetch all action, call setSpeed(var).

1 Like

Oh nice, that sounds like it’ll suit my goals for now, thanks!