x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Timer & Countdown: How to implement state of the art / best practice?

There are numerous tutorials on the topic of timers and countdowns in UE4 and the UE4 docs also have a section on it. However, there are several different ways to approach an implementation. Thus, I would like to know:

Which way is best in order to achieve accurate timing (including milliseconds) without causing unnecessary overhead?

In case someone reads this post and wonders what different possibilities I could mean (or is just looking for any way to implement a timer or countdown):

Product Version: UE 4.16
Tags:
more ▼

asked Jul 27 '17 at 01:17 PM in Blueprint Scripting

avatar image

Syrill
217 22 23 31

avatar image Syrill Jul 27 '17 at 07:01 PM

So far - on Facebook - I only got the reply that timelines cause overhead and Event Tick with 1 second delay is sensitive to errors...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Advantages Timer:

Easy to Controll via Handle. Saves you from multiple bool states like isTimerActive, isTimerDone, etc. aswell as not keeping track of a counter. Once its done its gone no more worries here that something is still executing.

Advantages Event Tick:

Best used on things that run indefinitly or to a Unknown amount of Time. If you find yourself adding lots of bools/branches Consider if you actually want to use a Timer instead. Need to keep track of the Counting.

Advantages Timeline:

Timelines return you the Value specified at given time passed from the Curve you set (at time X return Value Y). They are not meant to be used as Counter at all. They have also a good Set of Controls and are a Component that comes with a slight overhead.

Advantages Delays (Or better call it Latent Actions)

A Delay is a Latent Action and its basicly a dont proceed execution flow for x Time. The catch is everything before still gets executed when the Function is called again that often leads to undesired behaviour and a classic Bug Source. Delays are a Bad example for a Latent Action but if you think of something like a MoveTo Latent Action it makes sense that you don´t want to execute anything after it until you reach the Target. And thats the advantage of latent Actions: Interupting execution flow until the Action is completed.

Thats a Quick summery of the things you looking at.

more ▼

answered Jul 28 '17 at 11:53 AM

avatar image

Nachtmahr
7k 143 28 172

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question