Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.AC_Trigger Class Reference
Inheritance diagram for AC.AC_Trigger:

Public Member Functions

bool IsOn ()
 Checks if the Trigger is enabled. More...
void TurnOn ()
 Enables the Trigger.
void TurnOff ()
 Disables the Trigger.
- Public Member Functions inherited from AC.ActionList
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.
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...

Public Attributes

TriggerDetects detects = TriggerDetects.Player
GameObject obToDetect
string detectComponent = ""
int triggerType
bool showInEditor = false
bool cancelInteractions = false
TriggerReacts triggerReacts = TriggerReacts.OnlyDuringGameplay
- Public Attributes inherited from AC.ActionList
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

Additional Inherited Members

- Static Public Member Functions inherited from AC.ActionList
static AC.Action GetDefaultAction ()
 Gets the default Action set within ActionsManager. More...
- Protected Member Functions inherited from AC.ActionList
virtual void BeginActionList (int i, bool addToSkipQueue)
void ProcessAction (int i)
void CheckEndCutscene ()
void ReturnLastResultToSource (ActionEnd _lastResult, int i)
virtual void FinishPause ()
virtual void AddResumeToManager (int startIndex)
- Protected Attributes inherited from AC.ActionList
bool isSkipping = false
LayerMask LayerHotspot
LayerMask LayerOff
List< int > resumeIndices = new List<int>()
bool isChangingScene = false

Detailed Description

An ActionList that is run when the Player, or another object, comes into contact with it.

Member Function Documentation

◆ IsOn()

bool AC.AC_Trigger.IsOn ( )

Checks if the Trigger is enabled.

True if the Trigger is enabled.

Member Data Documentation

◆ cancelInteractions

bool AC.AC_Trigger.cancelInteractions = false

If True, and the Player sets off the Trigger while walking towards a Hotspot Interaction, then the Player will stop, and the Interaction will be cancelled

◆ detectComponent

string AC.AC_Trigger.detectComponent = ""

The component that must be attached to an object for the Trigger to react to, if detects = TriggerDetects.AnyObjectWithComponent

◆ detects

TriggerDetects AC.AC_Trigger.detects = TriggerDetects.Player

What the Trigger will react to (Player, SetObject, AnyObject, AnyObjectWithComponent)

◆ obToDetect

GameObject AC.AC_Trigger.obToDetect

The GameObject that the Trigger reacts to, if detects = TriggerDetects.SetObject

◆ showInEditor

bool AC.AC_Trigger.showInEditor = false

If True, then a Gizmo will be drawn in the Scene window at the Trigger's position

◆ triggerReacts

TriggerReacts AC.AC_Trigger.triggerReacts = TriggerReacts.OnlyDuringGameplay

The state of the game under which the trigger reacts (OnlyDuringGameplay, OnlyDuringCutscenes, DuringCutscenesAndGameplay)

◆ triggerType

int AC.AC_Trigger.triggerType

What kind of contact the Trigger reacts to (0 = "On enter", 1 = "Continuous", 2 = "On exit")