you “could” reuse the Timeline if they were all to be in lockstep (so triggering all of them at once by just removing the delay)
if each one is to be at a different point on the timeline, then perhaps moving the responsibility of tracking the timeline from what appears to be the manager to the actor itself. instead of calling the timeline in the manager to update each actor based on the timeline. have the Manager call the EventStartAnimation
maybe an “Event Dispatcher
” which is Blueprint’s version of a Delegate. each AnimatingActor would then have a float TimeOffset
, float Accumulator
, the timeline, and a state control variable (I like enums which if derived from byte/uint8 have the same memory space as a bool and can have up to 256 states where each bool only has 2, even if the enum is derived from int32/EngineInt it will still take up the space of 4 boolean variables)
you can look at this reply by Everynone as how to bind Event Dispatchers
How can I call an event from another Blueprint? - #4 by Everynone
if the Array of actors is to be consistent then in the ConstructionScript()
iterate over the array assigning binding the event that will be dispatched to, and set the value of TimeOffset()
then in your trigger Event for the Manager call the EventDispatcher which will Broadcast to all the Bound Events.
now in Event_Tick()
monitor the state control variable and the TimeOffset (based on the DeltaTime being fed into the accumulator) considering that Timelines, and Animations already use the Engines Tick you are not really saving that much by using a Delay but having the activation of it being outside of the “Input->Logic->Physics->Logic->Render->Logic” engine loop where you can get inconsistency with the varying frame rate.
when the accumulator has hit change the stateControl variable and start the animation/Timeline.