Hello.
I have custom event MoveTile in which Timeline changes ActorLocation. As I understand it, when I call this custom event, next node after it, “virtually” connected to Update output pin in Timeline, not to Finished.
I use Delay after each call of event, to make sure that Timeline has finished. So my question is there better approach, maybe it’s possible to use Finished output directly somehow?
I’m a bit confused by
"As I understand it, when I call this custom event, next node after it, “virtually” connected to Update output pin in Timeline, not to Finished
It looks like you are trying to check when the timeline has finished. You can use the finished exec pin directly.
Please clarify if I’m misunderstanding.
I assume MoveTileAnimation is an event that is leading to that play from start pin.
I also assume the length of your move Timeline is 0.7.
C fires before B because C fires immediately and B fires at the end of the timeline. I’m pretty sure that PassTurn will be called a frame before B thanks to the delay node.
What you should do, is instead of having a delay, put the RemoveActionPoints node right before the PlayFromStart exec pin, and call pass turn right before/after EnableInput.
Oh, I bit confused you with “PassTurn event fires before timeline actually ends”, I meant it would fire before timeline end without Delay. As for Delay I set time a bit longer (0.7) than Timeline duration (0.5). It work, just kinda don’t like this approach as latter if I would change duration I also would need to correct all Delay nodes.
You suggestion is reasonable, but I also use MoveTile event in case where it should not end turn, so want to avoid it.
I guess, theoretically I can create another “MoveWithDelay” event and call it instead of MoveTile, right?
To answer your original question a bit better:
A and C are not connected. But in this case, it will execute as ACAAAAA… AAAB
Well how you have it now is fine. Just use GetScaledTimelineLength instead of a constant.
From what I can tell this is what you actually wanted.
With this, the timeline will trigger finished and then the delay will complete.
Example:
This will output
Meaning timeline finished triggered first.
Big thanks to you, not just for this solution - which is great, but also for clarifying how things work.
np. Glad I could help