ULimenObjectiveComponent
Overview
ULimenObjectiveComponent is a custom actor component designed to manage and track objectives. It provides functionality to add, remove, and update objectives, as well as broadcast events when objectives are added, updated, or completed. This component can be spawned in Blueprints and accessed via C++ code.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| OnNewObjectiveAdded | BlueprintAssignable | Event triggered when a new objective is added. |
| OnObjectiveUpdated | BlueprintAssignable | Event triggered when an objective is updated. |
| OnObjectiveCompleted | BlueprintAssignable | Event triggered when an objective is completed. |
| OnObjectivesLoaded | BlueprintAssignable | Event triggered when objectives are loaded. |
| OnObjectivesUntracked | BlueprintAssignable | Event triggered when objectives are untracked. |
Functions
Return Type | Signature | Description |
|---|---|---|
| TrackObjective(ALimenObjective* NewObjective) | Adds a new objective to the component's list if it does not already exist. Returns true if successful, false otherwise. |
| IsTrackingObjective(ALimenObjective* Test) const | Checks if the component is tracking a specific objective. |
| LoadObjectives(const TArray< ALimenObjective *>& InObjectives) | Loads a list of objectives into the component and resets any existing objectives. |
| GetObjectives() const | Returns a reference to the list of currently tracked objectives. |
Usage & Implementation Notes
This component does not require threading constraints or replication.
Memory lifetime management is handled internally by managing the lifecycle of objectives added to the component.
Initialization dependencies include having
ALimenObjectiveinstances available for tracking.