Navigation
API > API/Plugins > API/Plugins/GameplayBehaviorsModule > API/Plugins/GameplayBehaviorsModule/UGameplayBehavior_BehaviorTree
Description
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
Virtual Inheritance
- UGameplayBehavior::Trigger → UGameplayBehavior_BehaviorTree::Trigger
| Name | Trigger |
| Type | function |
| Header File | /Engine/Plugins/Experimental/GameplayBehaviors/Source/GameplayBehaviorsModule/Public/AI/GameplayBehavior_BehaviorTree.h |
| Include Path | #include "AI/GameplayBehavior_BehaviorTree.h" |
| Source | /Engine/Plugins/Experimental/GameplayBehaviors/Source/GameplayBehaviorsModule/Private/AI/GameplayBehavior_BehaviorTree.cpp |
virtual bool Trigger
(
AActor & Avatar,
const UGameplayBehaviorConfig * Config,
AActor * SmartObjectOwner
)
True if behavior was triggered and caller should register to OnBehaviorFinished to be notified on completion
Parameters
| Name | Remarks |
|---|---|
| Avatar | The actor on which the behavior should be execute |
| Config | Configuration parameters of the behavior |
| SmartObjectOwner | The actor associated to the smart object |