[BUG 4.7.2] Timeline play call in function

I have a timeline on event graph that will play just fine if called from event graph. By called I mean getting a reference to timeline then choosing Play(). This only seems to work from event graph. If I call TimeLine->Play() from a function it does not play, however TimeLine->Reverse() called from a function seems to work just fine.
Its easy enough to create a workaround with a custom event but I wanted to bring some attention this “bug” if you want to call it that.
I understand limitation of latent nodes not available to functions but that doesn’t make sense that only Reverse works.

Hi OpticalShadows,

Functions can’t support latent nodes, as you stated, but you can call Play on a Timeline that exists in your Event Graph from inside a function and it shouldn’t cause problems so long as you remember that it’s only calling Timeline and won’t wait for Timeline to finish before continuing with rest of function. In this case, using Play with target as your Timeline should work just as well as Reverse. Can you show me an image of situation in which calling Play in a function is not working for you? Thanks!

Hi ,

I’m having problems with this as well. In my Event Graph I have 4 timelines which I’m trying to trigger from within a function in same blueprint. I can call Play on them just fine from another node in Event Graph but not from function. Here’s how it looks:

EDIT: Reverse seems to work just fine.

Hi mihai.dbpx,

It looks like your Timelines aren’t hooked up to anything. Try creating a custom event for each. You don’t need to call event, but if Timeline isn’t attached to anything it shouldn’t ever run.

Hi ,

Thanks for your reply.

I thought they didn’t have to be hooked to something to be able to be called from another place, and Reverse works with them as above. I think it would be good if they would be callable without having them hooked.
I added custom events to call them as I needed in end.

I’m not certain why Reverse would work, and I haven’t been able to reproduce that. I’ll keep looking into it and see if something needs to be fixed. Thanks!

Hi ,

I would be interested for reason, why timeline node has to be connected to a custom event, even if event is never called.

Is it, because blueprint compiler (optimizer) ignores any nodes in event graph not connected to any event nodes?

That’s correct. A Timeline doesn’t act like a function or event that can be called, as much as it may seem like one. Instead, if you want to actually use it, you need to have it in an event graph somewhere connected to an executable node, like a custom event.

Just FYI, this behavior is oddly intermittent. In a previous UE4 version I was calling Play From Start from a function targeting a Timeline in my Event Graphthat was not hooked up to anything, and it was working as expected. After updating to4.8.2that legacy wiring was still working but I could not repeat functionality with a newTimelineand function call. TriggeringPlay From Start` with a custom event works as described in every case.

Hi , this behavior of timelines was introduced recently enough (4.7 or 4.8), it broke some parts of my project that have been functional for a long while.

I haven’t checked in older versions, but yes, it’s possible this was cleaned up in newer versions. It isn’t supposed to be possible to run or access Timelines that are not connected to an Event in some way.