Task System
SF's task system gives players direction in their story, and can help tie together cinematics and gameplay. Tasks are queue-based, meaning any tasks that get created are added to a "Task Queue". Once one has been completed, the next task will be displayed and "active".
Creating tasks are done by calling the Add Main Task to Queue
function using a SFInventoryManager_AC
reference. The following properties can be defined on this function below.
— Task Info Structure
- This variable contains all of the necessary task information such as,
Task Header
Text
The "Name" of this task.Task Description
Text
The description displayed on the top-right of the players screen when this task is "active".Task Image
Slate Brush
A background image that can be set to visually explain the task in some manor.Task Timer
Float
A time requirement to complete this task before it fails and displays the next task (Leaving this set to "0,0" will not enforce any timer on this task).
— Insert in Queue at Index Int
- Used to insert a new task at a custom specified location in the task queue if needed. Leaving this set to "0" will insert this task at the end of the queue (last index).
Editing Tasks is done by calling the Edit Target Main Task in Queue
function from the SFInventoryManager_AC
component. This function includes the following parameters to define.
— Target Task Header Text
- This is the header/name of the task you'd like to edit.
— New Task Info Structure
- Define the new task information for the task you're editing.
— Remove Bool
- An option to remove the target task instead of changing its task information.
Binding custom functionality when the player starts, completes, or fails a specific task can be done by utilzing the OnTaskCompleted
, OnTaskFailed
, and OnTaskInitialized
event dispatchers inside the SFInventoryManager_AC
component.

Last updated