Get Length in blueprints always returns 0

Hello,

I’m trying to use “Get Length” as a node in UE4 but it always returns 0.
Is there anything specific I need to do, to make this work?
I’m on version 2.01.08

Thanks!

Nevermind… I think the problem is that my timeline is empty cause the actual sound events are in referenced event instruments, chosen by a parameter at runtime.
Is there a way to get the length of the actual sound that is currently being played?
“Get timeline position” works though.

I cannot think of any way to get the length of a playing event with that kind of setup using Blueprints. What is it you need the length for? There might be an alternative way of achieving the same goal.

I try to determine when an event is close to be finished, like 90% finished for example.

A workaround could be to use a marker callback at the right moment.

I thought about this but it would be very tedious, because I will end up with a very large amount of events. Also not sure if this works with referenced events.

I can’t think of any nice ways to get the end time of a nested event with Blueprints. The only thing I can think of would be to use Command Instruments in your nested events to set a global parameter that tells you how long the event will be when it first starts playing, but that is tedious and error prone- it will work with nested events though.