UGameplayBehavior_AnimationBased

That this behavior is supporting playing only a single montage for a given Avatar at a time.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UGameplayBehavior

UGameplayBehavior_AnimationBased

References

Module

GameplayBehaviorsModule

Header

/Engine/Plugins/Experimental/GameplayBehaviors/Source/GameplayBehaviorsModule/Public/GameplayBehavior_AnimationBased.h

Include

#include "GameplayBehavior_AnimationBased.h"

Syntax

UCLASS()
class UGameplayBehavior_AnimationBased : public UGameplayBehavior

Remarks

That this behavior is supporting playing only a single montage for a given Avatar at a time. Trying to play multiple or using multiple UGameplayBehavior_AnimationBased instances will result in requests overriding and interfering.

Variables

Name Description

Protected variable UProperty

TArray< FMontag...

 

ActivePlayback

If this array ever gets more than couple elements at a time we should consider switching over to a TMap

Constructors

Name Description

Public function

UGameplayBehavior_AnimationBased

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function UFunction

void

 

OnMontageFinished

(
    UAnimMontage* Montage,
    bool bInterrupted,
    AActor* InAvatar
)

Public function

bool

 

PlayMontage

(
    AActor& InAvatar,
    UAnimMontage& AnimMontage,
    const float InPlayRate,
    const FName StartSectionName,
    const bool bLoop
)

Overridden from UGameplayBehavior

Name Description

Public function Virtual

void

 

EndBehavior

(
    AActor& InAvatar,
    const bool bInterrupted
)

Public function Virtual

bool

 

Trigger

(
    AActor& Avatar,
    const UGameplayBehaviorConfig*...,
    AActor* SmartObjectOwner
)

Default implementation will trigger the appropriate Blueprint event based on their presence in the script and in the following priority: