RealDocs

UAnimInstance::Montage_GetIsStopped

function Engine Blueprint Since 4.0
#include "Animation/AnimInstance.h"
Access: public Specifiers: ENGINE_APIconstBlueprintPureUFUNCTION

Description

Returns true if the montage is not currently active — either it was never started, has fully ended, or is in a blend-out phase. This is the logical inverse of a full "is truly playing" check.

Caveats & Gotchas

  • Returns true for a montage that is blending out, not just one that has fully finished. If you need to know that the montage has completely ended, listen to the OnMontageEnded delegate instead.
  • Passing a NULL montage pointer will result in undefined behaviour on some engine builds — always pass a valid montage reference.

Signature

ENGINE_API bool Montage_GetIsStopped(const UAnimMontage* Montage) const;

Parameters

Name Type Description Default
Montage const UAnimMontage* The montage to query.

Return Type

bool

Example

Allow re-triggering only when fully stopped C++
void AMyCharacter::TryPlayAttack()
{
	UAnimInstance* AnimInst = GetMesh()->GetAnimInstance();
	if (AnimInst && AnimInst->Montage_GetIsStopped(AttackMontage))
	{
		AnimInst->Montage_Play(AttackMontage);
	}
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.