My timeline works perfectly until I add in these delay nodes with a random time. Once added in, the object will not move, and simply blinks once each time it updates to the next timeline—remaining stationary.
I am pretty new to UE: is this a bug or is it something you can’t do for some reason? Is there some better way to achieve this goal of putting a random delay in before the start of each timeline?
Delays are a little bit of a hack. They are kinda like coroutines for blueprints, but can’t capture the call stack, and thus they only work on the event sheet, not inside functions.
Timelines do generate events on the event sheets, but they execute slightly differently than “true” events.
I don’t know for sure that this is the problem, but I would make each of those “and then” for the delay, instead be a new custom event that gets fired on a timer. (Remember to assign the timer handle to a variable when you start it.)
However, it’s also possible that the problem is that something else is trying to set the location of that same “Head” component, so the execute result of the timeline, and that other “something else” might be fighting about who runs last each tick.
In general, if you want to move something along a circuit, it’s better to generate an animation for that, and play that animation. Animations can also call you back when they are done. Depending on how big and unique the thing is, you might use a character/skeletal animation, an animation blueprint, an actor sequence, or a level sequence.
Thank you for the quick response! Most of this is/was beyond my current understanding so I started looking into what Coroutines are, which lead down a rabbit hole. Then the call stack. Then into timers. I then tried a multigate with custom events being “blocked” from firing by delay nodes, but that also didn’t work. I couldn’t seem to get the timer to work properly either, so I decided to scrap the randomness and just make 1 timeline that has all of the movement inside of it (set to loop).
I haven’t done much with animations yet, but it’s good to know I can accomplish similar things in there. Your response helped me figure out more of the important things I do not know yet. Thank you very much!