Why GetCurrentMontage return null in the middle of a montage playback

Hi Guys,

I have a Montage for a Melee Attack with the followings sections.

StartAttack01, EndAttack01, StartAttack02, EndAttack02. In StartAttack01 i have two notifies one a few miliseconds from begining and other a few miliseconds before end. In this rage, we activate to apply damage (using Traces) and if the user clic inside this range of time, i like to set Montage_SetNextSection StartAttack02 to continue with a combo. The problem is that when the second notify is triggered Montage_GetCurrentSection return me None :frowning: . . . how it is possible ? if at this moment the montage is currently playing (the notify is a few milisecond before the end of the section).

In fact i use a MontageEnded delegate with a simple print to console log, and the order of call is the following. First Notify, Second Notify and EndMontage delegate. But . . . on the Second Notify method Montage_GetCurrentSection return me null.

But . . . if i move the notify more close to the begining of the section then Montage_GetCurrentSection return the correct section name.

Anyone can help me pleaseee ?

Best regards

1 Like

I finally found what was the reason for my problem. I going to put the answer here because maybe another user has the same problem.

Montage has the Blend in and Blend out time. By default the Blend out time is 0.25, this means that in the last 0.25 seconds of your animation unreal start blending between you montage and the animation running in the State machine. During this last seconds (the blend out time) if you call the GetCurrentMontage, this method will return NULL.

So, do not loose your mind if GetCurrentMontage return NULL, is because you are calling it during the blend out time :wink:

Best regards

1 Like

Thanks, this helped me.