Adventure Creator 1.84.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
Loading...
Searching...
No Matches
AC.ActionListAsset Class Reference
Inheritance diagram for AC.ActionListAsset:
AC.IItemReferencer AC.IDocumentReferencer AC.IObjectiveReferencer AC.IMenuReferencer AC.IVariableReferencer AC.InvActionList AC.MenuActionList

Public Member Functions

void CopyFromActionList (ActionList actionList)
ActionParameter CreateNewParameter ()
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.
void Interact ()
void Interact (List< ActionParameter > newParameters)
 Runs the ActionList asset file, but updates parameter values before doing so.
void RunFromIndex (int index)
 Runs the ActionList asset file from a set point.
RuntimeActionList Interact (int parameterID, int parameterValue)
 Runs the ActionList asset file, after setting the value of an integer parameter if it has one.
RuntimeActionList[] GetRuntimeInstances ()
 Gets an array of all ActionLists associated with this asset that are currently running.
void KillAllInstances ()
 Kills all currently-running instances of the asset.
ActionParameter GetParameter (int _ID)
 Gets a parameter of a given ID number. This is not a default parameter, but one used at runtime to actually modify Actions.
ActionParameter GetParameter (string label)
List< ActionParameterGetParameters ()
 Gets all parameters associated with the asset. If called in Edit mode, these will be the default parameters. If called at runtime, this will instead return the parameters used at runtime to actually modify Actions.
void AssignParameterValues (List< ActionParameter > newParameters)
 Updates a List of parameter values to be used at runtime.
void AfterDownloading ()
int GetNumItemReferences (int itemID)
int UpdateItemReferences (int oldItemID, int newItemID)
int GetNumMenuReferences (string menuName, string elementName="")
int GetNumVariableReferences (VariableLocation variableLocation, int variableID, Variables _variables=null, int _variablesConstantID=0)
int UpdateVariableReferences (VariableLocation variableLocation, 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)

Static Public Member Functions

static void ConvertToCutscene (MenuCommand command)
static void ConvertToActionListAsset (MenuCommand command)
static void FindGlobalReferences (MenuCommand command)
static void SyncAssetObjects (ActionListAsset actionListAsset)
static ActionListAsset CreateFromActions (string fileName, string filePath, List< Action > _actions, ActionListType actionListType=ActionListType.PauseGameplay)

Public Attributes

List< AC.Actionactions = new List<AC.Action>()
bool isSkippable = true
ActionListType actionListType = ActionListType.PauseGameplay
bool unfreezePauseMenus = true
bool useParameters = false
bool canRunMultipleInstances = false
bool canSurviveSceneChanges = false
bool revertToDefaultParametersAfterRunning = false
int tagID
List< ActionGroup > groups = new List<ActionGroup> ()

Properties

List< ActionParameterDefaultParameters [get, set]
int NumParameters [get]

Detailed Description

An ActionListAsset is a ScriptableObject that allows a List of Action objects to be stored within an asset file. When the file is run, the Actions are transferred to a local instance of RuntimeActionList and run from there.

Member Function Documentation

◆ AfterDownloading()

void AC.ActionListAsset.AfterDownloading ( )

Called after the Actions are downloaded to a RuntimeActionList instance

◆ AssignParameterValues()

void AC.ActionListAsset.AssignParameterValues ( List< ActionParameter > newParameters)

Updates a List of parameter values to be used at runtime.

Parameters
newParametersThe new parameter values. Parameters will be updated by matchind ID value, not by index. Parameters that are not included in the list will not be updated.

◆ GetNumDocumentReferences()

int AC.ActionListAsset.GetNumDocumentReferences ( int documentID)

◆ GetNumItemReferences()

int AC.ActionListAsset.GetNumItemReferences ( int itemID)

Implements AC.IItemReferencer.

◆ GetNumMenuReferences()

int AC.ActionListAsset.GetNumMenuReferences ( string menuName,
string elementName = "" )

Implements AC.IMenuReferencer.

◆ GetNumObjectiveReferences()

int AC.ActionListAsset.GetNumObjectiveReferences ( int objectiveID)

◆ GetNumVariableReferences()

int AC.ActionListAsset.GetNumVariableReferences ( VariableLocation variableLocation,
int variableID,
Variables _variables = null,
int _variablesConstantID = 0 )

◆ GetParameter()

ActionParameter AC.ActionListAsset.GetParameter ( int _ID)

Gets a parameter of a given ID number. This is not a default parameter, but one used at runtime to actually modify Actions.

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

◆ GetParameters()

List< ActionParameter > AC.ActionListAsset.GetParameters ( )

Gets all parameters associated with the asset. If called in Edit mode, these will be the default parameters. If called at runtime, this will instead return the parameters used at runtime to actually modify Actions.

Returns
All parameters associated with the asset

◆ GetRuntimeInstances()

RuntimeActionList[] AC.ActionListAsset.GetRuntimeInstances ( )

Gets an array of all ActionLists associated with this asset that are currently running.

Returns
All ActionLists associated with this asset that are currently running.

◆ Interact() [1/3]

void AC.ActionListAsset.Interact ( )

Runs the ActionList asset file

◆ Interact() [2/3]

RuntimeActionList AC.ActionListAsset.Interact ( int parameterID,
int parameterValue )

Runs the ActionList asset file, after setting the value of an integer parameter if it has one.

Parameters
parameterIDThe ID of the Integer parameter to set
parameterValueThe value to set the Integer parameter to

◆ Interact() [3/3]

void AC.ActionListAsset.Interact ( List< ActionParameter > newParameters)

Runs the ActionList asset file, but updates parameter values before doing so.

Parameters
newParametersThe new parameter values

◆ IsSkippable()

bool AC.ActionListAsset.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

◆ RunFromIndex()

void AC.ActionListAsset.RunFromIndex ( int index)

Runs the ActionList asset file from a set point.

Parameters
indexThe index number of actions to start from

◆ UpdateDocumentReferences()

int AC.ActionListAsset.UpdateDocumentReferences ( int oldDocumentID,
int newDocumentID )

◆ UpdateItemReferences()

int AC.ActionListAsset.UpdateItemReferences ( int oldItemID,
int newItemID )

Implements AC.IItemReferencer.

◆ UpdateObjectiveReferences()

int AC.ActionListAsset.UpdateObjectiveReferences ( int oldObjectiveID,
int newObjectiveID )

◆ UpdateVariableReferences()

int AC.ActionListAsset.UpdateVariableReferences ( VariableLocation variableLocation,
int oldVariableID,
int newVariableID,
Variables _variables = null,
int _variablesConstantID = 0 )

Member Data Documentation

◆ actionListType

ActionListType AC.ActionListAsset.actionListType = ActionListType.PauseGameplay

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

◆ actions

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

The Actions within this asset file

◆ canRunMultipleInstances

bool AC.ActionListAsset.canRunMultipleInstances = false

If True, then multiple instances of this asset can be run simultaneously in the scene

◆ canSurviveSceneChanges

bool AC.ActionListAsset.canSurviveSceneChanges = false

If True, then the ActionList will not end when the scene changes through natural gameplay (but will still end when loading a save game file)

◆ isSkippable

bool AC.ActionListAsset.isSkippable = true

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

◆ revertToDefaultParametersAfterRunning

bool AC.ActionListAsset.revertToDefaultParametersAfterRunning = false

If True, and useParameters = True, then the parameters will revert to their default values after each time the Actions are run

◆ tagID

int AC.ActionListAsset.tagID

The ID of the associated SpeechTag

◆ unfreezePauseMenus

bool AC.ActionListAsset.unfreezePauseMenus = true

If True, the game will un-freeze itself while the Actions run if the game was previously paused

◆ useParameters

bool AC.ActionListAsset.useParameters = false

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

Property Documentation

◆ DefaultParameters

List<ActionParameter> AC.ActionListAsset.DefaultParameters
getset

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

◆ NumParameters

int AC.ActionListAsset.NumParameters
get

The number of parameters associated with the asset