ALimenAIControllerBase
Overview
ALimenAIControllerBase extends AAIController and serves as a foundational class for managing AI logic. It includes components for behavior trees, blackboards, and AI perception, along with methods to control the AI's brain logic and respond to sensory inputs.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| BehaviorTreeComponent | EditDefaultsOnly, BlueprintReadOnly | The behavior tree component used for AI decision-making. |
| BlackboardComponent | EditDefaultsOnly, BlueprintReadOnly | The blackboard component used to store and retrieve data for the AI. |
| AIPerception | EditDefaultsOnly, BlueprintReadOnly | The AI perception component that handles sensory inputs. |
| bIsSensing | Private | Indicates whether the AI is currently sensing something. |
| StimulusLocation | Private | Stores the location of the last stimulus detected by the AI. |
| LastSensedActor | Private | Stores a weak pointer to the last actor sensed by the AI. |
| bIsBrainLogicActive | Private | Indicates whether the AI's brain logic is currently active. |
Functions
Return Type | Signature | Description |
|---|---|---|
| BeginPlay() | Initializes the AI controller and sets up event bindings for AI perception updates. |
| ResumeBrainLogic(const FString& Reason) | Resumes the AI's brain logic with an optional reason. |
| PauseBrainLogic(const FString& Reason) | Pauses the AI's brain logic with an optional reason. |
| IsSensing() const | Returns whether the AI is currently sensing something. |
| GetLastStimulusLocation() const | Returns the location of the last stimulus detected by the AI. |
| GetLastSensedActor() const | Returns a pointer to the last actor sensed by the AI. |
| GetBehaviourTree() const | Returns the current behavior tree being used by the AI. |
| GetBlackboard() const | Returns the blackboard asset associated with the AI's behavior tree. |
Usage & Implementation Notes
Threading Constraints: This class does not have any specific threading constraints.
Replication Requirements: None.
Memory Lifetime Management: The
LastSensedActoris managed using a weak pointer to avoid memory leaks.Initialization Dependencies: The AI controller depends on the presence of a behavior tree, blackboard, and AI perception component.