Get Matinee total length and current playing time

Hi,

I have created a matinee and my GameMode blueprint can use this matinee actor. I am trying to use a progress bar to display this matinee’s current progress in UMG. For instance, my matinee is 10 seconds long and it is playing for 3 seconds so far. I want to display these information with UMG.

However, I can’t find any property doing this in my GameMode blueprint. Any idea to solve this problem?

Thank you very much!!!

I’m wondering the same thing. Can get the Interp Data, but I see no actions for getting the length. This would be an important function to have for creating subtitles in cinematic Matinees.

A way for your purpose could be a Event Track

Thx, but that would require Event placement by hand in a large number of matinees. I’m looking to do it more systematically.

Hi MuNansen,

In our game we use event tracks to throw events to the level blueprint for subtitles handling, but we’ve also written a method to get the length of a matinee actor that we use to set a failsafe timer in case the Finish event gets missed in a low-framerate situation.

In a static blueprint function library header:

[FONT=Courier New] UFUNCTION(BlueprintPure, Category = “WarmachineBlueprintLibrary | Matinee”, meta = (ToolTip = “Returns the duration of the supplied Matinee Actor.”))
static float GetMatineeLength(const AMatineeActor* MatineeActor);

Implementation:

[FONT=Courier New]#include “Matinee/MatineeActor.h”
#include “Matinee/InterpData.h”

float UWarmachineBlueprintLibrary::GetMatineeLength(const AMatineeActor* MatineeActor)
{
if (MatineeActor && MatineeActor->MatineeData)
{
return MatineeActor->MatineeData->InterpLength * MatineeActor->PlayRate;
}
return 0.0f;
}

Blueprint looks like this: