How can I have time dilation increase with each input

I’m trying to make a game where you have the ability to slow down and speed up the gameplay so that it matches your pace. How would I be able to do this?

Hello,

You can use variables in a Blueprint to store current dilation value, min, max and step size (or just ‘hard code’ them in the graph), then respond to the input events appropriately and set the new dilation value.
Something like this:

Thanks


This is also a viable solution

There are a couple of issues there, increment and decrement (++ and --) add/subtract one, you will likely want a smaller step than that; taking one off the starting value for example will leave zero, so decreasing once will actually pause the game (I think, or maybe the call will be ignored with a 0 passed in).

They also generally operate on named variables, as they mutate it, unclear what is actually happening when you use it with a temporary like you are doing here, or if it will work as expected.

You could certainly get rid of all the variables I used if you wanted:

and I guess if you don’t want to clamp, those might be considered optional. I assume you will want to limit the range though.

Ok, thanks that’s really good