What's the best way to make a timer?

Hey all. I’ve been messing around with various ways to create a timer, whether it be to count up or down. I’ve used Event Tick, Get Gameplay , Timelines, and Set Timer/Set Timer Delegates.

I was wondering if one of these, or perhaps another alternative, is the best, most efficient way to keep track of .

Thanks!

I would use timeline. I used that in my endless runner and worked fine.

But it is going to depend on what you need the timer for to.

I’m making timers for a level (say, the level lasts 60 seconds) that counts down to 0, and I’m making timers for duration in an area at the moment. I liked timelines too.

I want to wait to hear if anyone else wishes to give their input. If not, I’ll mark your answer as Correct later.

Thanks for the response C:

Gameplay Timers should be driven by the Event tick. For adding and removing seconds from a “clock” (timer), you would normaly use the Tick and add the Delta to a float variable.

I’m doing this for my Gameplay Timer that counts how long the players last before getting killed by a heave wave of enemies.

Although you could use a timer that gets started with the BeginPlay, the EventTick ensures with the delta , that every Players get’s the same . Having low fps or a lag? The DeltaTime response to it (at least i think that is how it happens).

I get ya.
I usually try to avoid using Event Tick as much as possible because I don’t want to become too dependent on it, as it could lead to slower FPS and performance. Usually, I opt for something I can control and turn on/off more, such as Timelines. Because I would be handling the server-side only, replicating that information to the clients shouldn’t be an issue with whether I use DeltaTime or not. (I think? I may be wrong on that.).

I’ll try it though.

Thanks! C:

Hm, if you are using it only on the server, then you could use a timer, set to 1 sec and looping to get this started. But i can’t promise that using the event tick wouldnt be better.

I’m liking the event tick for the moment. Thanks C: