Play Montage in c++ with OnBlendOut, OnInterrupted, etc...
How do I play an animation montage on a skeletal mesh component from c++ such that I can get callbacks for OnCompleted, OnBlendOut, OnInterrupted, etc... just like the "PlayMontage" node in the picture?
I found this function but I don't see any way to bind callbacks to it:
Thanks in advance for your help!
asked Apr 13 '19 at 06:30 PM in C++ Programming
You can look into the UPlayMOntageCallbackProxy how it's done in the engine.
But what basically happens is, The montage is started with AnimInstance->Montage_Play and if that is successful you set right callbacks on the animinstance:
AnimInstance->Montage_SetBlendingOutDelegate AnimInstance->Montage_SetEndDelegate AnimInstance->OnPlayMontageNotifyBegin.AddDynamic AnimInstance->OnPlayMontageNotifyEnd.AddDynamic
You also should make sure to unbind your callbacks at the right moments.
The function which shows how to add is this:
answered Apr 14 '19 at 06:58 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here