Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.ActionList Class Reference
Inheritance diagram for AC.ActionList:
AC.iActionListAssetReferencer AC.IItemReferencer AC.IDocumentReferencer AC.IObjectiveReferencer AC.IMenuReferencer AC.IVariableReferencer AC.AC_Trigger AC.Cutscene AC.DialogueOption AC.Interaction AC.RuntimeActionList

Public Member Functions

void Initialise ()
 
virtual void Interact ()
 
void RunFromIndex (int index)
 Runs the Actions from a set point. More...
 
void Interact (int i, bool addToSkipQueue)
 Runs the Actions from a set point. More...
 
void Skip ()
 
void Skip (int i)
 Runs the Actions instantly, from a set point. More...
 
bool AreActionsRunning ()
 Checks if any Actions are currently being run. More...
 
void ResetList ()
 
virtual void Kill ()
 
bool IsSkippable ()
 Checks if the ActionListAsset is skippable. This is safer than just reading 'isSkippable', because it also accounts for actionListType - since ActionLists that run in the background cannot be skipped More...
 
List< ActionGetActions ()
 Gets the List of Actions that this ActionList runs, regardless of source. More...
 
ActionParameter GetParameter (string label)
 Gets a parameter of a given name. More...
 
ActionParameter GetParameter (int _ID)
 Gets a parameter of a given ID number. More...
 
void Pause ()
 Pauses the ActionList once it has finished running it's current Action. More...
 
void Resume (int _startIndex, int[] _resumeIndices, string _parameterData, bool rerunPreviousAction=false)
 Resumes the ActionList. More...
 
string GetParameterData ()
 Gets the current ActionParameter values as a serializable string. More...
 
void SetParameterData (string dataString)
 Assigns parameter values based on a string generated by the GetParameterData function More...
 
int GetNumItemReferences (int itemID)
 
int UpdateItemReferences (int oldItemID, int newItemID)
 
int GetNumMenuReferences (string menuName, string elementName="")
 
int GetNumVariableReferences (VariableLocation _location, int variableID, Variables _variables=null, int _variablesConstantID=0)
 
int UpdateVariableReferences (VariableLocation _location, int oldVariableID, int newVariableID, Variables _variables=null, int _variablesConstantID=0)
 
int GetNumDocumentReferences (int documentID)
 
int UpdateDocumentReferences (int oldDocumentID, int newDocumentID)
 
int GetNumObjectiveReferences (int objectiveID)
 
int UpdateObjectiveReferences (int oldObjectiveID, int newObjectiveID)
 
bool ReferencesAsset (ActionListAsset actionListAsset)
 
List< ActionListAssetGetReferencedActionListAssets ()
 
bool ActionModified (int index)
 

Static Public Member Functions

static AC.Action GetDefaultAction ()
 Gets the default Action set within ActionsManager. More...
 

Public Attributes

List< AC.Actionactions = new List<AC.Action> ()
 
bool isSkippable = true
 
float triggerTime = 0f
 
bool autosaveAfter = false
 
ActionListType actionListType = ActionListType.PauseGameplay
 
Conversation conversation = null
 
ActionListAsset assetFile
 
ActionListSource source
 
bool unfreezePauseMenus = true
 
bool useParameters = false
 
List< ActionParameterparameters = new List<ActionParameter> ()
 
int tagID
 
bool syncParamValues = true
 

Static Public Attributes

static string logSuffix
 

Protected Member Functions

virtual void BeginActionList (int i, bool addToSkipQueue)
 
void ProcessAction (int i)
 
void CheckEndCutscene ()
 
virtual void ReturnLastResultToSource (int index, int i)
 
virtual void FinishPause ()
 
virtual void PrintActionComment (Action action)
 
virtual void AddResumeToManager (int startIndex)
 

Protected Attributes

bool isSkipping = false
 
LayerMask LayerHotspot
 
LayerMask LayerOff
 
List< int > resumeIndices = new List<int> ()
 
bool isChangingScene = false
 

Properties

int NumParameters [get]
 
bool IsSkipping [get]
 

Detailed Description

An ActionList stores and handles the sequential triggering of Action objects. Strung together, Actions can be used to create cutscenes, effects and gameplay logic. This base class is never used itself - only subclasses are intended to be placed on GameObjects.

Member Function Documentation

◆ AreActionsRunning()

bool AC.ActionList.AreActionsRunning ( )

Checks if any Actions are currently being run.

Returns
True if any Actions are currently being run

◆ GetActions()

List<Action> AC.ActionList.GetActions ( )

Gets the List of Actions that this ActionList runs, regardless of source.

Returns
The List of Actions that this ActionList runs, regardless of source.

◆ GetDefaultAction()

static AC.Action AC.ActionList.GetDefaultAction ( )
static

Gets the default Action set within ActionsManager.

Returns
The default Action set within ActionsManager

◆ GetParameter() [1/2]

ActionParameter AC.ActionList.GetParameter ( int  _ID)

Gets a parameter of a given ID number.

Parameters
_IDThe ID of the parameter to get
Returns
The parameter with the given ID number

◆ GetParameter() [2/2]

ActionParameter AC.ActionList.GetParameter ( string  label)

Gets a parameter of a given name.

Parameters
labelThe name of the parameter to get
Returns
The parameter with the given name

◆ GetParameterData()

string AC.ActionList.GetParameterData ( )

Gets the current ActionParameter values as a serializable string.

Returns
The current ActionParameter values as a serializable string

◆ Initialise()

void AC.ActionList.Initialise ( )

Clears the List of Actions and creates one instance of the default, as set within ActionsManager.

◆ Interact() [1/2]

virtual void AC.ActionList.Interact ( )
virtual

Runs the Actions normally, from the beginning.

Reimplemented in AC.AC_Trigger.

◆ Interact() [2/2]

void AC.ActionList.Interact ( int  i,
bool  addToSkipQueue 
)

Runs the Actions from a set point.

Parameters
iThe index number of actions to start from
addToSkipQueueIf True, then the ActionList will be skipped when the user presses the 'EndCutscene' Input button

◆ IsSkippable()

bool AC.ActionList.IsSkippable ( )

Checks if the ActionListAsset is skippable. This is safer than just reading 'isSkippable', because it also accounts for actionListType - since ActionLists that run in the background cannot be skipped

Returns
True if the ActionListAsset is skippable

◆ Kill()

virtual void AC.ActionList.Kill ( )
virtual

Stops the Actions from running and sets the gameState in StateHandler to the correct value.

Reimplemented in AC.RuntimeActionList.

◆ Pause()

void AC.ActionList.Pause ( )

Pauses the ActionList once it has finished running it's current Action.

◆ ResetList()

void AC.ActionList.ResetList ( )

Stops the Actions from running.

◆ Resume()

void AC.ActionList.Resume ( int  _startIndex,
int[]  _resumeIndices,
string  _parameterData,
bool  rerunPreviousAction = false 
)

Resumes the ActionList.

Parameters
_startIndexThe Action index that the ActionList was originally started from.
_resumeIndicesAn array of Action indices to resume from
_parameterDataThe ActionParameter values when paused, as a serializable string
rerunPreviousActionIf True, then any Actions that were running when the ActionList was paused will be re-run

◆ RunFromIndex()

void AC.ActionList.RunFromIndex ( int  index)

Runs the Actions from a set point.

Parameters
indexThe index number of actions to start from

◆ SetParameterData()

void AC.ActionList.SetParameterData ( string  dataString)

Assigns parameter values based on a string generated by the GetParameterData function

Parameters
dataStringThe data string to load parameter data from

◆ Skip() [1/2]

void AC.ActionList.Skip ( )

Runs the Actions instantly, from the beginning.

◆ Skip() [2/2]

void AC.ActionList.Skip ( int  i)

Runs the Actions instantly, from a set point.

Parameters
iThe index number of actions to start from

Member Data Documentation

◆ actionListType

ActionListType AC.ActionList.actionListType = ActionListType.PauseGameplay

The effect that running the Actions has on the rest of the game (PauseGameplay, RunInBackground)

◆ actions

List<AC.Action> AC.ActionList.actions = new List<AC.Action> ()

The Actions

◆ assetFile

ActionListAsset AC.ActionList.assetFile

The ActionListAsset file that stores the Actions, if source = ActionListSource.AssetFile

◆ autosaveAfter

bool AC.ActionList.autosaveAfter = false

If True, the game will auto-save when the Actions have finished running

◆ conversation

Conversation AC.ActionList.conversation = null

The Conversation to run when the Actions have finished running

◆ isSkippable

bool AC.ActionList.isSkippable = true

If True, the Actions will be skipped when the user presses the 'EndCutscene' Input button

◆ parameters

List<ActionParameter> AC.ActionList.parameters = new List<ActionParameter> ()

A List of ActionParameter objects that can be used to override values within the Actions, if useParameters = True

◆ source

ActionListSource AC.ActionList.source

Where the Actions are stored when not being run (InScene, AssetFile)

◆ syncParamValues

bool AC.ActionList.syncParamValues = true

If True, and source = ActionListSource.AssetFile, the asset file's parameter values will be shared amongst all linked ActionLists

◆ tagID

int AC.ActionList.tagID

The ID of the associated SpeechTag

◆ triggerTime

float AC.ActionList.triggerTime = 0f

The delay, in seconds, before the Actions are run when the ActionList is triggered

◆ unfreezePauseMenus

bool AC.ActionList.unfreezePauseMenus = true

If True, the game will un-freeze itself while the Actions run if the game was previously paused due to an enabled Menu

◆ useParameters

bool AC.ActionList.useParameters = false

If True, ActionParameters can be used to override values within the Action objects

Property Documentation

◆ NumParameters

int AC.ActionList.NumParameters
get

The number of parameters associated with the ActionList