Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.Action Class Reference
Inheritance diagram for AC.Action:
AC.iActionListAssetReferencer AC.IVariableReferencerAction AC.ActionAmbience AC.ActionAnim AC.ActionBlendShape AC.ActionCamera AC.ActionCameraCrossfade AC.ActionCameraShake AC.ActionCameraSplit AC.ActionCameraTP AC.ActionChangeMaterial AC.ActionCharAnim AC.ActionCharFace AC.ActionCharFaceDirection AC.ActionCharFollow AC.ActionCharHold AC.ActionCharMove AC.ActionCharPathFind AC.ActionCharPortrait AC.ActionCharRename AC.ActionCharRender AC.ActionCheck AC.ActionCheckMultiple AC.ActionCheckMultipleTemplate AC.ActionCinemaDirector AC.ActionComment AC.ActionContainerOpen AC.ActionContainerSet AC.ActionConversation AC.ActionDialogOption AC.ActionDialogOptionRename AC.ActionDocumentCollection AC.ActionDocumentOpen AC.ActionEndGame AC.ActionEvent AC.ActionFade AC.ActionFootstepSounds AC.ActionHighlight AC.ActionHotspotEnable AC.ActionInputActive AC.ActionInputSimulate AC.ActionInstantiate AC.ActionInteraction AC.ActionInteractionRun AC.ActionInventoryCrafting AC.ActionInventoryInteraction AC.ActionInventoryPrefab AC.ActionInventorySelect AC.ActionInventorySet AC.ActionInvProperty AC.ActionManageProfiles AC.ActionManageSaves AC.ActionMenuJournal AC.ActionMenuSelect AC.ActionMenuSetInputBox AC.ActionMenuState AC.ActionMixerSnapshot AC.ActionMovie AC.ActionMusic AC.ActionNavMesh AC.ActionObjectiveCheck AC.ActionObjectiveCheckType AC.ActionObjectiveSet AC.ActionOptionSet AC.ActionParallel AC.ActionParamSet AC.ActionParent AC.ActionPause AC.ActionPauseActionList AC.ActionPlayerLock AC.ActionPlayerLockPath AC.ActionPlayerSwitch AC.ActionPlayerTeleportInactive AC.ActionPlayMaker AC.ActionRandomCheck AC.ActionRename AC.ActionRunActionList AC.ActionSaveHandle AC.ActionScene AC.ActionSceneAdd AC.ActionSceneSwitchPrevious AC.ActionSendMessage AC.ActionSound AC.ActionSoundShot AC.ActionSpeech AC.ActionSpeechStop AC.ActionSpeechWait AC.ActionSpriteFade AC.ActionStopActionList AC.ActionSystemLock AC.ActionTeleport AC.ActionTemplate AC.ActionTimeline AC.ActionTimerSet AC.ActionTimescale AC.ActionTintMap AC.ActionTrackRegion AC.ActionTrackSet AC.ActionTransform AC.ActionTransformRecord AC.ActionVarCopy AC.ActionVarPopup AC.ActionVarPreset AC.ActionVarSequence AC.ActionVarSet AC.ActionVisible AC.ActionVolume AC.ActionWaitMultiple

Public Member Functions

 Action ()
 
virtual void Upgrade ()
 
virtual float Run ()
 Runs the Action. More...
 
virtual void Skip ()
 
virtual int GetNextOutputIndex ()
 Gets the index of the output socket to use after the Action has run. More...
 
void PrintComment (ActionList actionList, ActionListAsset actionListAsset=null)
 Prints the Action's comment, if applicable, to the Console. More...
 
void SetOutputs (ActionEnd[] actionEnds)
 Update the Action's output sockets More...
 
void ResetSearchData ()
 
virtual void ShowGUI (List< ActionParameter > parameters)
 Shows the Action's GUI when its parent ActionList / ActionListAsset uses parameters. More...
 
virtual void ShowGUI ()
 
void SkipActionGUI (List< Action > actions, bool showGUI)
 
virtual void AssignConstantIDs (bool saveScriptsToo=false, bool fromAssetFile=false)
 Called when an ActionList has been converted from a scene-based object to an asset file. Within it, AssignConstantID should be called for each of the Action's Constant ID numbers, which will assign a new number if one does not already exist, based on the referenced scene object. More...
 
virtual string SetLabel ()
 Gets a string that is shown after the Action's title in the Editor to help the user understand what it does. More...
 
void DrawOutWires (List< Action > actions, int i, int offset, Vector2 scrollPosition)
 
int FieldToID< T > (T field, int _constantID, bool alwaysAssign=false)
 
int FieldToID (Collider field, int _constantID)
 
void AddSaveScript< T > (Behaviour field)
 
void AddSaveScript< T > (GameObject _gameObject)
 
IDToField< T > (T field, int _constantID, bool moreInfo)
 
Collider IDToField (Collider field, int _constantID, bool moreInfo)
 
int FieldToID (Transform field, int _constantID, bool alwaysAssign=false)
 
Transform IDToField (Transform field, int _constantID, bool moreInfo)
 
int FieldToID (GameObject field, int _constantID)
 
int FieldToID (GameObject field, int _constantID, bool alwaysAssign)
 
GameObject IDToField (GameObject field, int _constantID, bool moreInfo)
 
GameObject IDToField (GameObject field, int _constantID, bool moreInfo, bool alwaysShow)
 
virtual bool ConvertLocalVariableToGlobal (int oldLocalID, int newGlobalID)
 Converts the Action's references from a given local variable to a given global variable More...
 
virtual bool ConvertGlobalVariableToLocal (int oldGlobalID, int newLocalID, bool isCorrectScene)
 Converts the Action's references from a given global variable to a given local variable More...
 
virtual int GetNumVariableReferences (VariableLocation location, int varID, List< ActionParameter > parameters, Variables variables=null, int variablesConstantID=0)
 Gets the number of references the Action makes to a variable More...
 
virtual int UpdateVariableReferences (VariableLocation location, int oldVarID, int newVarID, List< ActionParameter > parameters, Variables variables=null, int variablesConstantID=0)
 Updated references the Action makes to a variable More...
 
virtual bool ReferencesObjectOrID (GameObject gameObject, int id)
 Checks if the Action makes reference to a particular GameObject More...
 
virtual bool ReferencesAsset (ActionListAsset actionListAsset)
 
virtual List< ActionListAssetGetReferencedActionListAssets ()
 
virtual bool ReferencesPlayer (int playerID=-1)
 Checks if the Action makes reference to a particular ActionList asset More...
 
virtual void AssignParentList (ActionList actionList)
 Passes the ActionList that the Action is a part of to the Action class. This is run before the Action is called or displayed in an Editor. More...
 
virtual void AssignValues (List< ActionParameter > parameters)
 Overwrites any appropriate variables with values set using parameters, or from ConstantID numbers. More...
 
virtual void AssignValues ()
 
virtual void Reset (ActionList actionList)
 Resets any runtime values that are necessary to run the Action succesfully More...
 
BoolValue AssignBoolean (List< ActionParameter > parameters, int _parameterID, BoolValue field)
 Replaces a boolean based on an ActionParameter, if appropriate. More...
 
int AssignInteger (List< ActionParameter > parameters, int _parameterID, int field)
 Replaces an integer based on an ActionParameter, if appropriate. More...
 
float AssignFloat (List< ActionParameter > parameters, int _parameterID, float field)
 Replaces a float based on an ActionParameter, if appropriate. More...
 
Transform AssignFile (List< ActionParameter > parameters, int _parameterID, int _constantID, Transform field)
 Replaces a Transform based on an ActionParameter or ConstantID instance, if appropriate. More...
 
Collider AssignFile (List< ActionParameter > parameters, int _parameterID, int _constantID, Collider field)
 Replaces a Collider based on an ActionParameter or ConstantID instance, if appropriate. More...
 
Object AssignObject< T > (List< ActionParameter > parameters, int _parameterID, Object field)
 Replaces a GameObject based on an ActionParameter or ConstantID instance, if appropriate. More...
 
AssignFile< T > (List< ActionParameter > parameters, int _parameterID, int _constantID, T field, bool doLog=true)
 Replaces a generic Behaviour based on an ActionParameter or ConstantID instance, if appropriate. More...
 
AssignFile< T > (int _constantID, T field)
 Replaces a generic Behaviour based on a ConstantID, if appropriate. More...
 
Transform AssignFile (int _constantID, Transform field)
 Replaces a Transform based on a ConstantID, if appropriate. More...
 
void FixLinkAfterDeleting (Action actionToDelete, Action targetAction, List< Action > actionList)
 
virtual void ClearIDs ()
 
virtual void SetLastResult (int _lastRunOutput)
 Updates which output was followed when the Action was last run More...
 
void ResetLastResult ()
 
virtual void ResetAssetValues ()
 
void SetOutput (ActionEnd actionEnd)
 Update the Action's output socket More...
 

Static Public Member Functions

static int ChooseParameterGUI (string label, List< ActionParameter > _parameters, int _parameterID, ParameterType _expectedType, int excludeParameterID=-1, string tooltip="", bool alwaysShow=false)
 
static int ChooseParameterGUI (string label, List< ActionParameter > _parameters, int _parameterID, ParameterType[] _expectedTypes, int excludeParameterID=-1, string tooltip="")
 
static int ChooseParameterGUI (List< ActionParameter > _parameters, int _parameterID)
 
static int FieldToID (GameObject field, int _constantID, bool alwaysAssign, bool _isAssetFile)
 
static GameObject IDToField (GameObject field, int _constantID, bool moreInfo, bool alwaysShow, bool _isAssetFile)
 
static ActionEnd GenerateStopActionEnd ()
 
static T CreateNew< T > ()
 
static Action CreateNew (string className)
 
static void EditSource (Action _action)
 

Public Attributes

int id
 
bool isDisplayed
 
bool showComment
 
string comment
 
bool willWait
 
bool isRunning
 
List< ActionEndendings = new List<ActionEnd> ()
 
bool isEnabled = true
 
bool isAssetFile = false
 
bool isMarked = false
 
bool isBreakPoint = false
 
Color overrideColor = Color.white
 
bool showOutputSockets = true
 
ActionList parentActionListInEditor = null
 

Static Public Attributes

const int skipSocketSeparation = 48
 
const int socketSeparation = 28
 

Protected Member Functions

void AddSearchTerm (string term)
 
string TextArea (string text)
 
string TextField (string label, string text)
 
string DelayedTextField (string label, string text)
 
void AfterRunningOption ()
 
void SkipActionGUI (ActionEnd ending, List< Action > actions, bool showGUI)
 
void AssignConstantID< T > (T field, int _constantID, int _parameterID)
 
void AssignConstantID (Collider field, int _constantID, int _parameterID)
 
void AssignConstantID (Transform field, int _constantID, int _parameterID)
 
void AssignConstantID (GameObject field, int _constantID, int _parameterID)
 
int ChoosePlayerGUI (int _playerID, bool includeActiveOption=false)
 
void TryAssignConstantID (Component component, ref int _constantID)
 
void TryAssignConstantID (GameObject gameObject, ref int _constantID)
 
Player AssignPlayer (int _playerID, List< ActionParameter > parameters, int _playerParameterID)
 
void Log (string message, Object context=null)
 
void LogWarning (string message, Object context=null)
 
void LogError (string message, Object context=null)
 
ActionParameter GetParameterWithID (List< ActionParameter > parameters, int _id)
 
string AssignString (List< ActionParameter > parameters, int _parameterID, string field)
 
Vector3 AssignVector3 (List< ActionParameter > parameters, int _parameterID, Vector3 field)
 
int AssignVariableID (List< ActionParameter > parameters, int _parameterID, int field)
 
GVar AssignVariable (List< ActionParameter > parameters, int _parameterID, GVar field)
 
Variables AssignVariablesComponent (List< ActionParameter > parameters, int _parameterID, Variables field)
 
int AssignInvItemID (List< ActionParameter > parameters, int _parameterID, int field)
 
int AssignDocumentID (List< ActionParameter > parameters, int _parameterID, int field)
 
GameObject AssignFile (List< ActionParameter > parameters, int _parameterID, int _constantID, GameObject field)
 Replaces a GameObject based on an ActionParameter or ConstantID instance, if appropriate. More...
 
GameObject AssignFile (int _constantID, GameObject field)
 Replaces a GameObject based on a ConstantID, if appropriate. More...
 
virtual string GetSocketLabel (int i)
 
ActionEnd GenerateActionEnd (ResultAction _resultAction, ActionListAsset _linkedAsset, Cutscene _linkedCutscene, int _skipAction, Action _skipActionActual, List< Action > _actions)
 

Protected Attributes

ActionCategory category = ActionCategory.Custom
 
string title = "Untitled"
 
string description
 

Properties

string searchData [get, protected set]
 
virtual ActionCategory Category [get]
 
virtual string Title [get]
 
virtual string Description [get]
 
virtual int NumSockets [get]
 
virtual bool RunNormallyWhenSkip [get]
 
virtual bool RunAllOutputs [get]
 
float defaultPauseTime [get]
 
int LastRunOutput [get]
 
Rect NodeRect [get, set]
 

Detailed Description

The base class from which all Actions derive. An Action is a ScriptableObject that performs a specific command, like pausing the game or moving a character. They are chained together in ActionLists to form cutscenes, gameplay logic etc.

Constructor & Destructor Documentation

◆ Action()

AC.Action.Action ( )

The default Constructor.

Member Function Documentation

◆ AssignBoolean()

BoolValue AC.Action.AssignBoolean ( List< ActionParameter parameters,
int  _parameterID,
BoolValue  field 
)

Replaces a boolean based on an ActionParameter, if appropriate.

Parameters
parametersA List of ActionParameters that may override the Transform
_parameterIDThe ID of the ActionParameter to search for within parameters that will replace the float
fieldThe bool to replace
Returns
The replaced BoolValue enum, or field if no replacements were found

◆ AssignConstantIDs()

virtual void AC.Action.AssignConstantIDs ( bool  saveScriptsToo = false,
bool  fromAssetFile = false 
)
virtual

Called when an ActionList has been converted from a scene-based object to an asset file. Within it, AssignConstantID should be called for each of the Action's Constant ID numbers, which will assign a new number if one does not already exist, based on the referenced scene object.

Parameters
saveScriptsTooIf True, then the Action shall attempt to add the appropriate 'Remember' script to reference GameObjects as well.
fromAssetFileIf True, then the Action is placed in an ActionListAsset file

Reimplemented in AC.ActionCameraTP, AC.ActionVarSet, AC.ActionVarCheck, AC.ActionParamSet, AC.ActionInvProperty, AC.ActionParamCheck, AC.ActionRunActionList, AC.ActionInstantiate, AC.ActionInventoryPrefab, AC.ActionSpeech, AC.ActionVarCopy, AC.ActionTransform, AC.ActionTimeline, AC.ActionPlayerSwitch, AC.ActionCharFace, AC.ActionCharMove, AC.ActionNavMesh, AC.ActionMovie, AC.ActionCharPathFind, AC.ActionVarPopup, AC.ActionTeleport, AC.ActionVarSequence, AC.ActionRandomCheck, AC.ActionContainerSet, AC.ActionBlendShape, AC.ActionConversation, AC.ActionCharHold, AC.ActionSound, AC.ActionTransformRecord, AC.ActionCharAnim, AC.ActionCamera, AC.ActionCharFollow, AC.ActionInteractionRun, AC.ActionCharRender, AC.ActionPlayerTeleportInactive, AC.ActionHighlight, AC.ActionTrackCheck, AC.ActionInteraction, AC.ActionContainerCheck, AC.ActionTintMap, AC.ActionScene, AC.ActionPauseActionList, AC.ActionSceneSwitchPrevious, AC.ActionRaycast, AC.ActionSendMessage, AC.ActionSpeechWait, AC.ActionTrackSet, AC.ActionAnim, AC.ActionCameraSplit, AC.ActionParent, AC.ActionFootstepSounds, AC.ActionInteractionCheck, AC.ActionCharFaceDirection, AC.ActionSoundShot, AC.ActionContainerOpen, AC.ActionCameraCrossfade, AC.ActionDialogOption, AC.ActionPlayMaker, AC.ActionCheckActionList, AC.ActionCinemaDirector, AC.ActionDialogOptionRename, AC.ActionVisible, AC.ActionChangeMaterial, AC.ActionCharPortrait, AC.ActionVisibleCheck, AC.ActionVolume, AC.ActionHotspotEnable, AC.ActionSpriteFade, AC.ActionTrackRegion, AC.ActionCharRename, AC.ActionStopActionList, AC.ActionTagCheck, AC.ActionRename, AC.ActionObjectCheck, and AC.ActionMoveableCheck.

◆ AssignFile() [1/5]

GameObject AC.Action.AssignFile ( int  _constantID,
GameObject  field 
)
protected

Replaces a GameObject based on a ConstantID, if appropriate.

Parameters
_constantIDIf !=0, The ConstantID number of the GameObject to replace field with
fieldThe GameObject to replace
Returns
The replaced GameObject, or field if no replacements were found

◆ AssignFile() [2/5]

Transform AC.Action.AssignFile ( int  _constantID,
Transform  field 
)

Replaces a Transform based on a ConstantID, if appropriate.

Parameters
_constantIDIf !=0, The ConstantID number of the Transform to replace field with
fieldThe Transform to replace
Returns
The replaced Transform, or field if no replacements were found

◆ AssignFile() [3/5]

Collider AC.Action.AssignFile ( List< ActionParameter parameters,
int  _parameterID,
int  _constantID,
Collider  field 
)

Replaces a Collider based on an ActionParameter or ConstantID instance, if appropriate.

Parameters
parametersA List of ActionParameters that may override the Collider
_parameterIDThe ID of the ActionParameter to search for within parameters that will replace the Collider
_constantIDIf !=0, The ConstantID number of the Collider to replace field with
fieldThe Collider to replace
Returns
The replaced Collider, or field if no replacements were found

◆ AssignFile() [4/5]

GameObject AC.Action.AssignFile ( List< ActionParameter parameters,
int  _parameterID,
int  _constantID,
GameObject  field 
)
protected

Replaces a GameObject based on an ActionParameter or ConstantID instance, if appropriate.

Parameters
parametersA List of ActionParameters that may override the GameObject
_parameterIDThe ID of the ActionParameter to search for within parameters that will replace the GameObject
_constantIDIf !=0, The ConstantID number of the GameObject to replace field with
fieldThe GameObject to replace
Returns
The replaced GameObject, or field if no replacements were found

◆ AssignFile() [5/5]

Transform AC.Action.AssignFile ( List< ActionParameter parameters,
int  _parameterID,
int  _constantID,
Transform  field 
)

Replaces a Transform based on an ActionParameter or ConstantID instance, if appropriate.

Parameters
parametersA List of ActionParameters that may override the Transform
_parameterIDThe ID of the ActionParameter to search for within parameters that will replace the Transform
_constantIDIf !=0, The ConstantID number of the Transform to replace field with
fieldThe Transform to replace
Returns
The replaced Transform, or field if no replacements were found

isAssetFile &&

◆ AssignFile< T >() [1/2]

T AC.Action.AssignFile< T > ( int  _constantID,
field 
)

Replaces a generic Behaviour based on a ConstantID, if appropriate.

Parameters
_constantIDIf !=0, The ConstantID number of the Behaviour to replace field with
fieldThe Behaviour to replace
Returns
The replaced Behaviour, or field if no replacements were found
Type Constraints
T :Behaviour 

◆ AssignFile< T >() [2/2]

T AC.Action.AssignFile< T > ( List< ActionParameter parameters,
int  _parameterID,
int  _constantID,
field,
bool  doLog = true 
)

Replaces a generic Behaviour based on an ActionParameter or ConstantID instance, if appropriate.

Parameters
parametersA List of ActionParameters that may override the Behaviour
_parameterIDThe ID of the ActionParameter to search for within parameters that will replace the Behaviour
_constantIDIf !=0, The ConstantID number of the Behaviour to replace field with
fieldThe Behaviour to replace
doLogIf True, and no file is found when one is expected, a warning message will be displayed in the Console
Returns
The replaced Behaviour, or field if no replacements were found
Type Constraints
T :Behaviour 

◆ AssignFloat()

float AC.Action.AssignFloat ( List< ActionParameter parameters,
int  _parameterID,
float  field 
)

Replaces a float based on an ActionParameter, if appropriate.

Parameters
parametersA List of ActionParameters that may override the Transform
_parameterIDThe ID of the ActionParameter to search for within parameters that will replace the float
fieldThe float to replace
Returns
The replaced float, or field if no replacements were found

◆ AssignInteger()

int AC.Action.AssignInteger ( List< ActionParameter parameters,
int  _parameterID,
int  field 
)

Replaces an integer based on an ActionParameter, if appropriate.

Parameters
parametersA List of ActionParameters that may override the Transform
_parameterIDThe ID of the ActionParameter to search for within parameters that will replace the float
fieldThe integer to replace
Returns
The replaced integer, or field if no replacements were found

◆ AssignObject< T >()

Object AC.Action.AssignObject< T > ( List< ActionParameter parameters,
int  _parameterID,
Object  field 
)

Replaces a GameObject based on an ActionParameter or ConstantID instance, if appropriate.

Parameters
parametersA List of ActionParameters that may override the GameObject
_parameterIDThe ID of the ActionParameter to search for within parameters that will replace the GameObject
fieldThe Object to replace
Returns
The replaced Object, or field if no replacements were found
Type Constraints
T :Object 

◆ AssignParentList()

virtual void AC.Action.AssignParentList ( ActionList  actionList)
virtual

◆ AssignValues() [1/2]

virtual void AC.Action.AssignValues ( )
virtual

Overwrites any appropriate variables from ConstantID numbers.

Reimplemented in AC.ActionDialogOption, and AC.ActionDialogOptionRename.

◆ AssignValues() [2/2]

virtual void AC.Action.AssignValues ( List< ActionParameter parameters)
virtual

Overwrites any appropriate variables with values set using parameters, or from ConstantID numbers.

Parameters
parametersA List of parameters that overwrite variable values

Reimplemented in AC.ActionCharAnim, AC.ActionAnim, AC.ActionVarSet, AC.ActionSpeech, AC.ActionTransform, AC.ActionRunActionList, AC.ActionInstantiate, AC.ActionVarCheck, AC.ActionParamSet, AC.ActionPlayerSwitch, AC.ActionMenuState, AC.ActionMovie, AC.ActionCharMove, AC.ActionConversation, AC.ActionSceneCheckAttribute, AC.ActionParamCheck, AC.ActionTeleport, AC.ActionVarPopup, AC.ActionCharRender, AC.ActionContainerOpen, AC.ActionInventoryPrefab, AC.ActionCharPathFind, AC.ActionInvProperty, AC.ActionQTE, AC.ActionNavMesh, AC.ActionCharHold, AC.ActionInventoryCheck, AC.ActionCharFace, AC.ActionCharFollow, AC.ActionCheckActionList, AC.ActionInventorySet, AC.ActionContainerSet, AC.ActionMenuCheck, AC.ActionSendMessage, AC.ActionVarCopy, AC.ActionInventorySelect, AC.ActionMenuSetInputBox, AC.ActionParent, AC.ActionTimeline, AC.ActionTrackCheck, AC.ActionRaycast, AC.ActionSaveHandle, AC.ActionTransformRecord, AC.ActionCameraSplit, AC.ActionTintMap, AC.ActionTrackSet, AC.ActionBlendShape, AC.ActionCameraTP, AC.ActionContainerCheck, AC.ActionSceneCheck, AC.ActionVarSequence, AC.ActionAmbience, AC.ActionMusic, AC.ActionRandomCheck, AC.ActionSound, AC.ActionPlayerTeleportInactive, AC.ActionCharFaceDirection, AC.ActionInventoryInteraction, AC.ActionManageProfiles, AC.ActionPauseActionList, AC.ActionScene, AC.ActionCamera, AC.ActionHighlight, AC.ActionPlayMaker, AC.ActionSpeechWait, AC.ActionManageSaves, AC.ActionPlayerLockPath, AC.ActionSaveCheck, AC.ActionSceneAdd, AC.ActionChangeMaterial, AC.ActionFootstepSounds, AC.ActionSoundShot, AC.ActionCameraCrossfade, AC.ActionInteractionRun, AC.ActionInventoryCheckSelected, AC.ActionSceneSwitchPrevious, AC.ActionStopActionList, AC.ActionCharRename, AC.ActionEndGame, AC.ActionFade, AC.ActionMenuJournal, AC.ActionMenuSelect, AC.ActionVolume, AC.ActionInteraction, AC.ActionMenuSlotCheck, AC.ActionOptionSet, AC.ActionRename, AC.ActionCameraShake, AC.ActionCharPortrait, AC.ActionInteractionCheck, AC.ActionHotspotEnable, AC.ActionInputCheck, AC.ActionSpriteFade, AC.ActionVisible, AC.ActionCinemaDirector, AC.ActionInventoryCrafting, AC.ActionPlayerCheck, AC.ActionTagCheck, AC.ActionVarPreset, AC.ActionVisibleCheck, AC.ActionDocumentCollection, AC.ActionDocumentOpen, AC.ActionObjectCheck, AC.ActionTimescale, AC.ActionTrackRegion, AC.ActionComment, AC.ActionMoveableCheck, AC.ActionDocumentCheck, AC.ActionInputSimulate, and AC.ActionPause.

◆ ConvertGlobalVariableToLocal()

virtual bool AC.Action.ConvertGlobalVariableToLocal ( int  oldGlobalID,
int  newLocalID,
bool  isCorrectScene 
)
virtual

Converts the Action's references from a given global variable to a given local variable

Parameters
oldGlobalIDThe ID number of the old global variable
newLocalIDThe ID number of the new local variable
isCorrectSceneIf True, the local variable is in the same scene as this ActionList. Otherwise, no change will made, but the return value will be the same
Returns
True if the Action is affected

Reimplemented in AC.ActionVarSet, AC.ActionVarCheck, AC.ActionInvProperty, AC.ActionSpeech, AC.ActionMenuState, AC.ActionVarCopy, AC.ActionRandomCheck, AC.ActionVarPopup, AC.ActionVarSequence, AC.ActionMenuSetInputBox, AC.ActionDialogOptionRename, and AC.ActionComment.

◆ ConvertLocalVariableToGlobal()

virtual bool AC.Action.ConvertLocalVariableToGlobal ( int  oldLocalID,
int  newGlobalID 
)
virtual

Converts the Action's references from a given local variable to a given global variable

Parameters
oldLocalIDThe ID number of the old local variable
newGlobalIDThe ID number of the new global variable
Returns
True if the Action was amended

Reimplemented in AC.ActionVarSet, AC.ActionVarCheck, AC.ActionInvProperty, AC.ActionSpeech, AC.ActionMenuState, AC.ActionVarCopy, AC.ActionVarPopup, AC.ActionVarSequence, AC.ActionRandomCheck, AC.ActionMenuSetInputBox, AC.ActionDialogOptionRename, and AC.ActionComment.

◆ GetNextOutputIndex()

virtual int AC.Action.GetNextOutputIndex ( )
virtual

Gets the index of the output socket to use after the Action has run.

Returns
The index of the output socket to run. If the index is negative or invalid it will result in the ActionList ending

Reimplemented in AC.ActionScene, AC.ActionVarCheck, AC.ActionConversation, AC.ActionParamCheck, AC.ActionVarSequence, AC.ActionRandomCheck, AC.ActionVarPopup, AC.ActionSceneCheckAttribute, AC.ActionCheck, AC.ActionSaveCheck, AC.ActionCheckMultipleTemplate, AC.ActionWaitMultiple, AC.ActionObjectiveCheck, and AC.ActionObjectiveCheckType.

◆ GetNumVariableReferences()

virtual int AC.Action.GetNumVariableReferences ( VariableLocation  location,
int  varID,
List< ActionParameter parameters,
Variables  variables = null,
int  variablesConstantID = 0 
)
virtual

Gets the number of references the Action makes to a variable

Parameters
locationThe variable's location (Global, Local)
varIDThe variable's ID number
parametersThe List of ActionParameters associated with the ActionList that contains the Action
variablesThe Variables component, if location = VariableLocation.Component
Returns
The number of references the Action makes to the variable

Implements AC.IVariableReferencerAction.

Reimplemented in AC.ActionSaveHandle, AC.ActionManageSaves, AC.ActionParamSet, AC.ActionParamCheck, AC.ActionRunActionList, AC.ActionSpeech, AC.ActionMenuState, AC.ActionDialogOptionRename, AC.ActionComment, AC.ActionManageProfiles, AC.ActionMenuSetInputBox, AC.ActionVarSet, AC.ActionVarCheck, AC.ActionInvProperty, AC.ActionVarCopy, AC.ActionVarPopup, AC.ActionVarSequence, and AC.ActionRandomCheck.

◆ PrintComment()

void AC.Action.PrintComment ( ActionList  actionList,
ActionListAsset  actionListAsset = null 
)

Prints the Action's comment, if applicable, to the Console.

Parameters
actionListThe associated ActionList of which this Action is a part of
actionListAssetThe associated ActionListAsset of which this Action is a part of

◆ ReferencesObjectOrID()

virtual bool AC.Action.ReferencesObjectOrID ( GameObject  gameObject,
int  id 
)
virtual

Checks if the Action makes reference to a particular GameObject

Parameters
gameObjectThe GameObject to check for
idThe GameObject's associated ConstantID value
Returns
True if the Action references the GameObject

Reimplemented in AC.ActionVarSet, AC.ActionVarCheck, AC.ActionRunActionList, AC.ActionSpeech, AC.ActionVarCopy, AC.ActionTransform, AC.ActionPlayerSwitch, AC.ActionTimeline, AC.ActionSceneCheckAttribute, AC.ActionTeleport, AC.ActionVarPopup, AC.ActionVarSequence, AC.ActionRandomCheck, AC.ActionTransformRecord, AC.ActionSound, AC.ActionTintMap, AC.ActionPlayerTeleportInactive, AC.ActionSendMessage, AC.ActionTrackCheck, AC.ActionSpeechWait, AC.ActionPauseActionList, AC.ActionScene, AC.ActionParent, AC.ActionRaycast, AC.ActionSceneSwitchPrevious, AC.ActionTrackSet, AC.ActionSoundShot, AC.ActionPlayMaker, AC.ActionVisible, AC.ActionVolume, AC.ActionVisibleCheck, AC.ActionSpriteFade, AC.ActionStopActionList, AC.ActionTagCheck, AC.ActionRename, AC.ActionParamSet, AC.ActionParamCheck, AC.ActionInvProperty, AC.ActionInstantiate, AC.ActionNavMesh, AC.ActionCharFace, AC.ActionMovie, AC.ActionCharMove, AC.ActionCharPathFind, AC.ActionContainerSet, AC.ActionBlendShape, AC.ActionCharHold, AC.ActionConversation, AC.ActionCharAnim, AC.ActionCharFollow, AC.ActionCharRender, AC.ActionCamera, AC.ActionInteractionRun, AC.ActionHighlight, AC.ActionContainerCheck, AC.ActionInteraction, AC.ActionAnim, AC.ActionFootstepSounds, AC.ActionDialogOptionRename, AC.ActionCameraSplit, AC.ActionCharFaceDirection, AC.ActionInteractionCheck, AC.ActionContainerOpen, AC.ActionCameraCrossfade, AC.ActionChangeMaterial, AC.ActionCheckActionList, AC.ActionDialogOption, AC.ActionCinemaDirector, AC.ActionCharPortrait, AC.ActionPlayerLockPath, AC.ActionCharRename, AC.ActionHotspotEnable, AC.ActionObjectCheck, and AC.ActionMoveableCheck.

◆ ReferencesPlayer()

◆ Reset()

virtual void AC.Action.Reset ( ActionList  actionList)
virtual

Resets any runtime values that are necessary to run the Action succesfully

Parameters
actionListThe ActionList that the Action is a part of<param>

Reimplemented in AC.ActionTimeline, and AC.ActionWaitMultiple.

◆ ResetAssetValues()

virtual void AC.Action.ResetAssetValues ( )
virtual

Use this in Action subclasses to reset any value in an asset-based Action when the game resets

Reimplemented in AC.ActionVarSequence.

◆ Run()

virtual float AC.Action.Run ( )
virtual

Runs the Action.

Returns
The time, in seconds, to wait before ActionList calls this function again. If 0, then the Action will not be re-run. If >0, and isRunning = True, then the Action will be re-run isRunning = False

Reimplemented in AC.ActionParamSet, AC.ActionInstantiate, AC.ActionSpeech, AC.ActionVarSet, AC.ActionTransform, AC.ActionTeleport, AC.ActionVarCopy, AC.ActionMenuSetInputBox, AC.ActionRunActionList, AC.ActionNavMesh, AC.ActionCharAnim, AC.ActionAnim, AC.ActionTransformRecord, AC.ActionInvProperty, AC.ActionConversation, AC.ActionInventoryPrefab, AC.ActionCharFollow, AC.ActionContainerOpen, AC.ActionContainerSet, AC.ActionMovie, AC.ActionCharHold, AC.ActionCharRender, AC.ActionCharPathFind, AC.ActionPlayerSwitch, AC.ActionCharMove, AC.ActionMenuState, AC.ActionTimeline, AC.ActionCharFace, AC.ActionTintMap, AC.ActionInventorySet, AC.ActionSendMessage, AC.ActionInventorySelect, AC.ActionParent, AC.ActionQTE, AC.ActionCharFaceDirection, AC.ActionSpeechWait, AC.ActionOptionSet, AC.ActionBlendShape, AC.ActionPlayMaker, AC.ActionTrackSet, AC.ActionCameraTP, AC.ActionFootstepSounds, AC.ActionSound, AC.ActionChangeMaterial, AC.ActionPauseActionList, AC.ActionCameraSplit, AC.ActionHighlight, AC.ActionSaveHandle, AC.ActionVarPreset, AC.ActionAmbience, AC.ActionMusic, AC.ActionCameraCrossfade, AC.ActionCharRename, AC.ActionPlayerLockPath, AC.ActionPlayerTeleportInactive, AC.ActionScene, AC.ActionCharPortrait, AC.ActionManageProfiles, AC.ActionCamera, AC.ActionInventoryInteraction, AC.ActionManageSaves, AC.ActionSceneAdd, AC.ActionSoundShot, AC.ActionStopActionList, AC.ActionCameraShake, AC.ActionMenuJournal, AC.ActionMenuSelect, AC.ActionVolume, AC.ActionEndGame, AC.ActionFade, AC.ActionInteractionRun, AC.ActionSceneSwitchPrevious, AC.ActionRename, AC.ActionInteraction, AC.ActionCinemaDirector, AC.ActionSystemLock, AC.ActionCheckActionList, AC.ActionDialogOption, AC.ActionDialogOptionRename, AC.ActionHotspotEnable, AC.ActionInputCheck, AC.ActionInventoryCrafting, AC.ActionSpriteFade, AC.ActionVisible, AC.ActionDocumentOpen, AC.ActionPlayerLock, AC.ActionTimescale, AC.ActionTrackRegion, AC.ActionDocumentCollection, AC.ActionComment, AC.ActionInputSimulate, AC.ActionPause, AC.ActionMixerSnapshot, AC.ActionTimerSet, AC.ActionEvent, AC.ActionTemplate, AC.ActionInputActive, AC.ActionSpeechStop, AC.ActionWaitMultiple, and AC.ActionObjectiveSet.

◆ SetLabel()

virtual string AC.Action.SetLabel ( )
virtual

Gets a string that is shown after the Action's title in the Editor to help the user understand what it does.

Returns
A string that is shown after the Action's title in the Editor to help the user understand what it does.

Reimplemented in AC.ActionParamSet, AC.ActionVarSet, AC.ActionVarCheck, AC.ActionParamCheck, AC.ActionRunActionList, AC.ActionInstantiate, AC.ActionInvProperty, AC.ActionSpeech, AC.ActionTransform, AC.ActionMenuState, AC.ActionNavMesh, AC.ActionTimeline, AC.ActionCharFace, AC.ActionPlayerSwitch, AC.ActionCharMove, AC.ActionMovie, AC.ActionSceneCheckAttribute, AC.ActionCharPathFind, AC.ActionTeleport, AC.ActionInventorySet, AC.ActionVarCopy, AC.ActionSaveHandle, AC.ActionContainerSet, AC.ActionInventoryCheck, AC.ActionQTE, AC.ActionSceneAdd, AC.ActionInventorySelect, AC.ActionConversation, AC.ActionCharHold, AC.ActionInventoryInteraction, AC.ActionTransformRecord, AC.ActionSound, AC.ActionManageProfiles, AC.ActionCharFollow, AC.ActionMenuSetInputBox, AC.ActionAmbience, AC.ActionMusic, AC.ActionCamera, AC.ActionCharRender, AC.ActionInteractionRun, AC.ActionVarPopup, AC.ActionTintMap, AC.ActionCharAnim, AC.ActionHighlight, AC.ActionPlayerTeleportInactive, AC.ActionInteraction, AC.ActionTrackCheck, AC.ActionBlendShape, AC.ActionContainerCheck, AC.ActionInventoryCheckSelected, AC.ActionPauseActionList, AC.ActionScene, AC.ActionSaveCheck, AC.ActionParent, AC.ActionSendMessage, AC.ActionManageSaves, AC.ActionRaycast, AC.ActionSpeechWait, AC.ActionFootstepSounds, AC.ActionTrackSet, AC.ActionCameraSplit, AC.ActionCameraTP, AC.ActionCharFaceDirection, AC.ActionOptionSet, AC.ActionInteractionCheck, AC.ActionAnim, AC.ActionSoundShot, AC.ActionVarPreset, AC.ActionContainerOpen, AC.ActionCameraCrossfade, AC.ActionFade, AC.ActionInputCheck, AC.ActionDialogOption, AC.ActionChangeMaterial, AC.ActionCheckActionList, AC.ActionCinemaDirector, AC.ActionDialogOptionRename, AC.ActionVisible, AC.ActionCharPortrait, AC.ActionMixerSnapshot, AC.ActionPlayerCheck, AC.ActionEndGame, AC.ActionMenuCheck, AC.ActionInventoryCrafting, AC.ActionVolume, AC.ActionCharRename, AC.ActionMenuSelect, AC.ActionVisibleCheck, AC.ActionDocumentOpen, AC.ActionMenuJournal, AC.ActionHotspotEnable, AC.ActionSpriteFade, AC.ActionPlatformCheck, AC.ActionMenuSlotCheck, AC.ActionStopActionList, AC.ActionTagCheck, AC.ActionRename, AC.ActionComment, AC.ActionTemplate, AC.ActionObjectiveCheck, AC.ActionDocumentCollection, AC.ActionObjectiveSet, AC.ActionMoveableCheck, AC.ActionPause, AC.ActionObjectCheck, AC.ActionInputSimulate, AC.ActionObjectiveCheckType, AC.ActionSpeechStop, AC.ActionDocumentCheck, AC.ActionCheckMultipleTemplate, and AC.ActionCheckTemplate.

◆ SetLastResult()

virtual void AC.Action.SetLastResult ( int  _lastRunOutput)
virtual

Updates which output was followed when the Action was last run

Parameters
_lastRunOutputThe index of the ending last run

Reimplemented in AC.ActionCheckActionList.

◆ SetOutput()

void AC.Action.SetOutput ( ActionEnd  actionEnd)

Update the Action's output socket

Parameters
actionEndA data container for the output socket

◆ SetOutputs()

void AC.Action.SetOutputs ( ActionEnd[]  actionEnds)

Update the Action's output sockets

Parameters
actionEndsA data container for the output sockets

◆ ShowGUI() [1/2]

◆ ShowGUI() [2/2]

virtual void AC.Action.ShowGUI ( List< ActionParameter parameters)
virtual

Shows the Action's GUI when its parent ActionList / ActionListAsset uses parameters.

Parameters
parametersA List of parameters available in the parent ActionList / ActionListAsset

Reimplemented in AC.ActionParamSet, AC.ActionInstantiate, AC.ActionVarSet, AC.ActionParamCheck, AC.ActionVarCheck, AC.ActionRunActionList, AC.ActionInvProperty, AC.ActionSpeech, AC.ActionMenuState, AC.ActionPlayerSwitch, AC.ActionCharMove, AC.ActionTransform, AC.ActionMovie, AC.ActionCharPathFind, AC.ActionCharFace, AC.ActionInventoryPrefab, AC.ActionSaveHandle, AC.ActionSceneAdd, AC.ActionTimeline, AC.ActionSceneCheckAttribute, AC.ActionNavMesh, AC.ActionTeleport, AC.ActionInventorySet, AC.ActionSceneCheck, AC.ActionInventorySelect, AC.ActionContainerSet, AC.ActionSound, AC.ActionMenuSetInputBox, AC.ActionManageProfiles, AC.ActionQTE, AC.ActionVarSequence, AC.ActionInventoryCheck, AC.ActionConversation, AC.ActionCharHold, AC.ActionCamera, AC.ActionTransformRecord, AC.ActionCharAnim, AC.ActionVarCopy, AC.ActionSaveCheck, AC.ActionSceneSwitchPrevious, AC.ActionAnim, AC.ActionPauseActionList, AC.ActionManageSaves, AC.ActionTintMap, AC.ActionRandomCheck, AC.ActionScene, AC.ActionSendMessage, AC.ActionRaycast, AC.ActionInventoryCheckSelected, AC.ActionTrackSet, AC.ActionHighlight, AC.ActionAmbience, AC.ActionSpeechWait, AC.ActionMusic, AC.ActionVarPopup, AC.ActionInputCheck, AC.ActionTrackCheck, AC.ActionOptionSet, AC.ActionCharRender, AC.ActionInteractionRun, AC.ActionCharFaceDirection, AC.ActionCharFollow, AC.ActionSoundShot, AC.ActionBlendShape, AC.ActionCameraShake, AC.ActionContainerOpen, AC.ActionParent, AC.ActionFade, AC.ActionCameraCrossfade, AC.ActionInteraction, AC.ActionCameraTP, AC.ActionDocumentOpen, AC.ActionCinemaDirector, AC.ActionPlayerTeleportInactive, AC.ActionVisible, AC.ActionContainerCheck, AC.ActionCheckActionList, AC.ActionCameraSplit, AC.ActionEndGame, AC.ActionMenuCheck, AC.ActionInventoryInteraction, AC.ActionVisibleCheck, AC.ActionMenuJournal, AC.ActionMenuSelect, AC.ActionInteractionCheck, AC.ActionPlayerLockPath, AC.ActionPlayMaker, AC.ActionInventoryCrafting, AC.ActionTimescale, AC.ActionFootstepSounds, AC.ActionHotspotEnable, AC.ActionSpriteFade, AC.ActionCharPortrait, AC.ActionCharRename, AC.ActionMenuSlotCheck, AC.ActionVarPreset, AC.ActionChangeMaterial, AC.ActionVolume, AC.ActionTimerSet, AC.ActionDocumentCollection, AC.ActionStopActionList, AC.ActionTagCheck, AC.ActionPause, AC.ActionRename, AC.ActionTrackRegion, AC.ActionInputActive, AC.ActionPlayerCheck, AC.ActionObjectCheck, AC.ActionMoveableCheck, AC.ActionInputSimulate, AC.ActionDocumentCheck, and AC.ActionParallel.

◆ Skip()

◆ UpdateVariableReferences()

virtual int AC.Action.UpdateVariableReferences ( VariableLocation  location,
int  oldVarID,
int  newVarID,
List< ActionParameter parameters,
Variables  variables = null,
int  variablesConstantID = 0 
)
virtual

Updated references the Action makes to a variable

Parameters
locationThe variable's location (Global, Local)
oldVarIDThe variable's original ID number
newVarIDThe variable's new ID number
parametersThe List of ActionParameters associated with the ActionList that contains the Action
variablesThe Variables component, if location = VariableLocation.Component
Returns
The number of references the Action makes to the variable

Implements AC.IVariableReferencerAction.

Reimplemented in AC.ActionSaveHandle, AC.ActionManageProfiles, AC.ActionManageSaves, AC.ActionParamSet, AC.ActionParamCheck, AC.ActionRunActionList, AC.ActionSpeech, AC.ActionMenuState, AC.ActionMenuSetInputBox, AC.ActionDialogOptionRename, AC.ActionComment, AC.ActionVarSet, AC.ActionVarCheck, AC.ActionInvProperty, AC.ActionVarCopy, AC.ActionVarPopup, AC.ActionVarSequence, and AC.ActionRandomCheck.

◆ Upgrade()

virtual void AC.Action.Upgrade ( )
virtual

Member Data Documentation

◆ comment

string AC.Action.comment

A user-defined comment about the Action's purpose

◆ endings

List<ActionEnd> AC.Action.endings = new List<ActionEnd> ()

A List of the various outcomes that running the Action can have

◆ id

int AC.Action.id

A unique identifier

◆ isAssetFile

bool AC.Action.isAssetFile = false

If True, the Action is stored within an ActionListAsset file

◆ isBreakPoint

bool AC.Action.isBreakPoint = false

If True, the Editor will pause when this Action is run in-game

◆ isDisplayed

bool AC.Action.isDisplayed

If True, the Action is expanded in the Editor

◆ isEnabled

bool AC.Action.isEnabled = true

If True, the Action is enabled and can be run

◆ isMarked

bool AC.Action.isMarked = false

If True, the Action has been marked for modification in ActionListEditorWindow

◆ isRunning

bool AC.Action.isRunning

If True, then the Action is running

◆ parentActionListInEditor

ActionList AC.Action.parentActionListInEditor = null

The Action's parent ActionList, if in the scene. This is not 100% reliable and should not be used in custom scripts

◆ showComment

bool AC.Action.showComment

If True, then the comment text will be shown in the Action's UI in the ActionList Editor window

◆ willWait

bool AC.Action.willWait

If True, the ActionList will wait until the Action has finished running before continuing

Property Documentation

◆ Category

virtual ActionCategory AC.Action.Category
get

The category (ActionList, Camera, Character, Container, Dialogue, Engine, Hotspot, Input, Inventory, Menu, Moveable, Object, Player, Save, Sound, ThirdParty, Variable, Custom)

◆ Description

virtual string AC.Action.Description
get

A brief description about what the Action does

◆ RunNormallyWhenSkip

virtual bool AC.Action.RunNormallyWhenSkip
get

If True, the Action will be run normally (i.e. can be run over multiple frames) when run as the result of skipping the ActionList

◆ Title

virtual string AC.Action.Title
get

The Action's title