UGameplayBehavior_BehaviorTree::Trigger

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

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

UGameplayBehavior::Trigger()

UGameplayBehavior_BehaviorTree::Trigger()

References

Module

GameplayBehaviorsModule

Header

/Engine/Plugins/Experimental/GameplayBehaviors/Source/GameplayBehaviorsModule/Public/AI/GameplayBehavior_BehaviorTree.h

Include

#include "AI/GameplayBehavior_BehaviorTree.h"

Source

/Engine/Plugins/Experimental/GameplayBehaviors/Source/GameplayBehaviorsModule/Private/AI/GameplayBehavior_BehaviorTree.cpp

Syntax

virtual bool Trigger
(
    AActor & Avatar,
    const UGameplayBehaviorConfig * Config,
    AActor * SmartObjectOwner
)

Remarks

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

OnTriggeredCharacter if used and Avatar is a Character

OnTriggeredPawn if used and Avatar is a Pawn

OnTriggered if used

Subclasses can override this method to control the whole flow

Returns

True if behavior was triggered and caller should register to OnBehaviorFinished to be notified on completion

Parameters

Parameter

Description

Avatar

The actor on which the behavior should be execute

Config

Configuration parameters of the behavior

SmartObjectOwner

The actor associated to the smart object