Event time with variable time

I want to make a timer that goes faster and faster.(3s, 2.5s, 2s, …) I thought I could use an Event Timer and set a variable for the time and change that variable eveytime the custom event is fired like in the screenshot. But I now realize that once the timer is started it loops with the time that was set at the beginning and that doesn’t get updated.

I feel like I’m missing something that’s probably not very complicated… If anyone can help i would be awesome !

Just a curious question; could you possible turn off the loop on the SetTimerByEvent, then drag the exec pin of the SetTimerByEvent and wrap it around and connect it back to itself? That way it’ll execute the first time at 3 seconds, then increment it each time by a bit?

Here is 2 ways to do it :

Hello JonathanJobin,

I didn’t know about “Set Timer By Event” so I made it for you using timeline instead. Sorry about that, you can implement it using that function too, I guess. I hope you will like my implementation though!

115659-1.png

It’s recursive once started, so it’s not using actor tick, just one timeline which start point resets to interpolated value, so it’s performance is quite cool. Timeline is called as reversed because there is an event in it set to time 0, TimelineCurrent is decreasing. It’s not going to start if values are wrong (branches in function StartDecrementingTimeline). The only problem I noticed with timelines is that you HAVE TO set the timeline length to desired StartTime. Oh, I forgot you can set it in blueprints too, to not worry about it. But if anyone knows how to ignore timeline length - give me a hint (I guess you can’t). Just don’t forget about timeline length, you can set it in Event curve inside the timeline.

In the same manner you can implement Incrementing Timeline, but I guess small tweaks would be needed.
I know it’s a bit complicated build, but just let me know what you think!

Regards,
Taberu

Here are the results! I’m quite happy how it turned out, you have full control over the behavior. I’m posting this screen as users should be aware of interpolating in such way.

I’m actually thinking now - maybe I’m doing it wrong. There will always be more steps closer to the target, because the section is smaller and smaller. At the same time - it seems to work here, nevertheless! It fits because the desire is to have faster and faster events. My concerns are actually about using such interpolation in different uses. I will have to remember to think over the case next time.

Thank you both for you help ! Plug the end of the event back into the timer like Mhousse1247 showed in his first example is the best and easiest way for what I need.