Adventure Creator  1.81.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
AC.ObjectiveInstance Class Reference

Public Member Functions

 ObjectiveInstance (int objectiveID)
 
 ObjectiveInstance (int objectiveID, int startingStateID)
 
 ObjectiveInstance (string saveData)
 
ObjectiveInstance[] GetSubObjectives ()
 Gets all Objective instances in the category marked as the 'sub-Objective category' for the Objective's current state More...
 
ObjectiveInstance[] GetSubObjectives (ObjectiveStateType objectiveStateType)
 Gets all Objective instances in the category marked as the 'sub-objective category' for the Objective's current state More...
 

Protected Attributes

Objective linkedObjective
 
int currentStateID
 
int previousStateID
 
long updateTime
 
bool isMarked
 

Properties

Objective Objective [get]
 
int CurrentStateID [get, set]
 
ObjectiveState CurrentState [get]
 
int PreviousStateID [get]
 
string SaveData [get]
 
int ObjectiveID [get]
 
long UpdateTime [get]
 
bool IsMarked [get, set]
 

Detailed Description

A runtime instance of an active Objective

Member Function Documentation

◆ GetSubObjectives() [1/2]

ObjectiveInstance [] AC.ObjectiveInstance.GetSubObjectives ( )

Gets all Objective instances in the category marked as the 'sub-Objective category' for the Objective's current state

Returns
All Objective instances that match the given criteria

◆ GetSubObjectives() [2/2]

ObjectiveInstance [] AC.ObjectiveInstance.GetSubObjectives ( ObjectiveStateType  objectiveStateType)

Gets all Objective instances in the category marked as the 'sub-objective category' for the Objective's current state

Parameters
objectiveStateTypeA filter for returned sub-Objectives based on their own current state<param>
Returns
All Objective instances that match the given criteria

Property Documentation

◆ CurrentState

ObjectiveState AC.ObjectiveInstance.CurrentState
get

The instance's current objective state

◆ CurrentStateID

int AC.ObjectiveInstance.CurrentStateID
getset

The ID number of the instance's current objective state

◆ IsMarked

bool AC.ObjectiveInstance.IsMarked
getset

A flag that represents if the objecive is 'marked' or not. This has no use internally, but can be set/read via custom script for use in extensions. The set value is stored within save-game files

◆ Objective

Objective AC.ObjectiveInstance.Objective
get

The Objective this instance is linked to

◆ ObjectiveID

int AC.ObjectiveInstance.ObjectiveID
get

The ID of the Objective

◆ PreviousStateID

int AC.ObjectiveInstance.PreviousStateID
get

The ID of the instance's previous objective state, or -1 if it has only been one state

◆ SaveData

string AC.ObjectiveInstance.SaveData
get

A data string containing all saveable data

◆ UpdateTime

long AC.ObjectiveInstance.UpdateTime
get

The time the objective was last updated, represented by the number of Ticks in DateTime