UChasePlayer
Overview
UChasePlayer is a custom Behavior Tree task node designed to make an AI controller chase a specified player. It inherits from UBTTaskNode and overrides the ExecuteTask method to implement the chasing logic.
Properties
Type | Name | Access | Description |
|---|---|---|---|
uint32 | PlayerId | EditAnywhere | The ID of the player to chase. |
Functions
Return Type | Signature | Description |
|---|---|---|
EBTNodeResult::Type | ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override | Executes the task and returns the result based on whether the AI successfully chases the player. |
Usage & Implementation Notes
Threading Constraints: This task should be executed in the game thread.
Replication Requirements: None.
Memory Lifetime Management: The task does not manage any dynamic memory that requires special handling.
Initialization Dependencies: The
PlayerIdproperty must be set before executing the task.