RealDocs

UAnimInstance::WasAnimNotifyNameTriggeredInStateMachine

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

Description

Returns true if a notify with the given name was triggered anywhere in the specified state machine during the last frame. Name-based counterpart to WasAnimNotifyTriggeredInStateMachine.

Caveats & Gotchas

  • The name is matched against the notify asset name, not the notify class. If multiple notify assets share the same name the result is true if any of them fired.
  • Returns false when queried on a machine index that is not currently active (e.g. a disabled layer). No warning is emitted.

Signature

UFUNCTION(BlueprintPure, Category="Animation")
bool WasAnimNotifyNameTriggeredInStateMachine(int32 MachineIndex, FName NotifyName) const;

Parameters

Name Type Description Default
MachineIndex int32 Index of the state machine to query.
NotifyName FName Name of the notify to check for.

Return Type

bool

Example

Check for a named notify across a state machine C++
if (WasAnimNotifyNameTriggeredInStateMachine(0, FName("WeaponSwing")))
{
    PerformHitTrace();
}

Version History

Introduced in: 4.11

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.