Anim Notifies: How to get begin time in Blueprint?

Hi guys, I’m currently stuck with this problem.

I have custom anim notify which is called from a weapon reload animation in order to increment / save reload progress as the animation progresses (the reason being if the reload is interrupted and the animation cancelled, it can later resume from last saved time).

For this to work, I need to either get the playback time of the animation or “Notify Begin Time” in the anim notifies “Received_Notify” function. And this is where I am currently stuck. I just couldn’t find a way to get either variables.

Any idea how I could achieve this? Is it even possible?

Get Current Active Montage into Montage Get Position and then you can play it back from there using the float, if I understand the problem correctly.

Unfortunately not really :frowning:

This is what my Received_Notify function looks like right now:

I just want to directly get the “Notify Begin Time” you can see in the picture of my original post, instead of having a redundant variable, in this case “Reload Anim Time”, in which I manually enter the “Notify Begin Time” for each Notify in my composite track.

Ever figure this out?

I don’t understand why so much is hidden from blueprint scripting, as I’m sure there’s a way through C++. It doesn’t always matter if it’s not very efficient.

bool UMyBPLibrary::GetNotifiesFromMontage(UAnimMontage* Montage, TArray<FAnimNotifyEvent>& NotifyEvents)
{
	bool result = false;
	if (Montage)
	{
		NotifyEvents = Montage->Notifies;
		result = true;
	}
	else
	{
		NotifyEvents = TArray<FAnimNotifyEvent>();
	}
	return result;
}

void UMyBPLibrary::GetNotifyTriggerDetails(FAnimNotifyEvent NotifyEvent, FName& TriggerName, double& TriggerTime)
{
	TriggerTime = NotifyEvent.GetTriggerTime();
	UAnimNotify* uan = NotifyEvent.Notify;
	if (uan)
	{
		TriggerName = FName(uan->GetNotifyName());
	}
	else
	{
		TriggerName = FName("nullPtr");
	}
}

The first function returns a list of all the trigger names, the second returns the trigger time of the given named trigger. It works for me, if you have multiple trigger tracks or something else not straightforward, it may need work.

This is how I’m using it, looking for a baseball “pitch” trigger time: