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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Timeline Not Reaching End Value

Hello all, so I updated to 4.21.1 yesterday and noticed my Event Graph wasn't working properly. Doing some quick troubleshooting I found that my looping Timeline was not actually reaching the desired number.

Here's what I mean: I have a timeline of length 1 with two keys set at (0,0) and (1,1). As it loops it should hit 1.0 and then begin the next loop; however it only reaches .99 before it resets.

In 4.19 (and maybe 4.20, never used that version) there was a bug in which the a looping Timeline would return 3 values every tick if it was set to 1 second. This made things difficult because if you wanted to add a value everytime the timeline reached 1, it would instead add that value 3 times. Luckily in 4.21.1 they fixed this bug.

"Bug Fix: TimelineComponent Update delegate will no longer execute three times when looping."

However this broke timelines completely because now, as stated, the timeline never reaches the end before it starts over. I've tried increasing the time to 1.01 but this results in the timeline skipping the end number randomly, and increasing it to 1.02 will sometimes skip it, sometimes hit it, and sometimes hit it twice. Very odd. I've also tried the opposite approach in setting my final key to return a value of 1.0 at .99 seconds, but that sometimes skips it too.

Any ideas how to work around this?

Product Version: UE 4.21
Tags:
more ▼

asked Dec 06 '18 at 04:04 PM in Blueprint Scripting

avatar image

ReclusiveRychu
16 2 1 4

avatar image ReclusiveRychu Dec 06 '18 at 04:48 PM

Slight work around: I set the Timeline length equal to 1.01, then set the value of my second key to (0.99, 1.02) and finally I added a condition that checks if the number is greater than 1.0. This seems to have worked in providing a consistent timeline. I'm checking to see how it does when it's play rate is increased.

avatar image ReclusiveRychu Dec 06 '18 at 04:52 PM

ABORT ABORT: It did NOT like a play rate increase! lol

increasing the play rate by 60 (going from real time to 1 minute every second) doesn't give the timeline enough time (dun dun tsss) to register a value greater than 1.

I know the previous bug that executed the looping timeline 3 times was annoying sometimes, but at least there was a work around haha

avatar image ReclusiveRychu Dec 06 '18 at 05:14 PM

Gunna go back to 4.19, this breaks all functionality for my project.

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

1 answer: sort voted first

For anyone who faced the same issue of the timeline not being able to reach the end value, I've discovered a workaround. Specifically for trying to accelerate the timeline, as creating a second tick is not too difficult.

So what I did is pretty simple: alt text Instead of using the timeline going from 0 to 1, then checking when it hits 1 and adding a second; what I do now is use real time seconds, truncate it into an integer, and then using a holder (set to a value of 0), I then compare the values.

When my Time Multiplier Preset is set to Real Time, it checks if there is a difference and then adds 1 to the "Sec Holder" thus allowing the process to loop and for there to always be a difference every second. If you don't do this then it will return a value every single tick. Which brings us to how we can accelerate time. If we use this error, if we set the Time Multiplier Preset to "Minute = 1 Second" we are now getting a smooth value increase every tick (essentially milliseconds instead of seconds), the difference here is that I don't add 1 after there is a difference therefore it will continues to find a difference every tick.

Hope this helps, if anyone had a similar issue!

EDIT/UPDATE: I found that using the error to get milliseconds results in a much faster time (faster than milliseconds) because it's returning false every tick, which happens much more frequently. The workaround is to do a similar setup as seconds, taking the fraction of seconds so that it is returning a 0 to 1 value regardless of where the second is at, then using that 0 to 1 value to lerp between 0 and 60 (59 in my case).

alt text

You'll still need to add 1 to the millisec holder after the branch that checks for a difference. Oh also if your clock is like mine you'll need to reset the millisec holder to 0 after every time increase. (i.e. if you're doing a minute every second, once seconds hits 60(59) reset the holder assuming you are also resetting the seconds) This will ensure there is time when the holder does equal time returning false.

newclock.jpg (206.9 kB)
newtimerupdated.jpg (123.9 kB)
more ▼

answered Apr 26 '19 at 04:19 PM

avatar image

ReclusiveRychu
16 2 1 4

avatar image ReclusiveRychu Apr 26 '19 at 04:21 PM

Also it didn't take me 5 months to figure this out, I had other work to do, and have finally had a chance to comeback to it, it only took me 3 hours lol

(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