![]() |
Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | Interact () |
void | Interact (ActionList actionList, ActionConversation actionConversation) |
Shows the Conversation's dialogue options. More... | |
void | TurnOn () |
bool | IsActive (bool includeResponses) |
Checks if the Conversation is currently active. More... | |
void | TurnOff () |
void | RunOption (int slot, bool force=false) |
Runs a dialogue option. More... | |
void | RunOptionWithID (int ID, bool force=false) |
Runs a dialogue option with a specific ID. More... | |
float | GetTimeRemaining () |
Gets the time remaining before a timed Conversation ends. More... | |
bool | SlotIsAvailable (int slot) |
Checks if a given slot exists More... | |
int | GetOptionID (int slot) |
Gets the ID of a dialogue option. More... | |
string | GetOptionName (int slot) |
Gets the display label of a dialogue option. More... | |
string | GetOptionNameWithID (int ID) |
Gets the display label of a dialogue option with a specific ID. More... | |
CursorIconBase | GetOptionIcon (int slot) |
Gets the display icon of a dialogue option. More... | |
CursorIconBase | GetOptionIconWithID (int ID) |
Gets the display icon of a dialogue option with a specific ID. More... | |
ButtonDialog | GetOption (int slot) |
Gets the ButtonDialog data container, which stores data for a dialogue option. More... | |
ButtonDialog | GetOptionWithID (int id) |
Gets the ButtonDialog data container with a given ID number, which stores data for a dialogue option. More... | |
int | GetNumEnabledOptions () |
Gets the number of dialogue options that are currently enabled. More... | |
bool | OptionHasBeenChosen (int slot) |
Checks if a dialogue option has been chosen at least once by the player. More... | |
bool | OptionWithIDHasBeenChosen (int ID) |
Checks if a dialogue option with a specific ID has been chosen at least once by the player. More... | |
bool | AllOptionsBeenChosen (bool onlyEnabled) |
Checks if all options have been chosen at least once by the player More... | |
void | TurnOptionOn (int id) |
Turns a dialogue option on, provided that it is unlocked. More... | |
void | TurnOptionOff (int id) |
Turns a dialogue option off, provided that it is unlocked. More... | |
void | SetOptionState (int id, bool flag, bool isLocked) |
Sets the enabled and locked states of a dialogue option, provided that it is unlocked. More... | |
void | TurnAllOptionsOn (bool includingLocked) |
Turns all dialogue options on More... | |
void | RenameOption (int id, string newLabel, int newLineID) |
Renames a dialogue option. More... | |
int | GetCount () |
Gets the number of enabled dialogue options. More... | |
bool | OptionWithIDIsActive (int ID) |
Checks if a dialogue option with a specific ID is active. More... | |
int[] | GetIDArray () |
bool | HasActionListOverride () |
bool | ConvertLocalVariableToGlobal (int oldLocalID, int newGlobalID) |
Converts the Conversations's references from a given local variable to a given global variable More... | |
int | GetNumVariableReferences (VariableLocation location, int varID, Variables variables=null, int _variablesConstantID=0) |
Gets the number of references to a given variable More... | |
int | UpdateVariableReferences (VariableLocation location, int oldVariableID, int newVariableID, Variables variables=null, int variablesConstantID=0) |
int | GetNumItemReferences (int itemID) |
int | UpdateItemReferences (int oldItemID, int newItemID) |
bool | ConvertGlobalVariableToLocal (int oldGlobalID, int newLocalID, bool isCorrectScene) |
Converts the Conversations's references from a given global variable to a given local variable More... | |
string | GetTranslatableString (int index) |
Gets the text to be translated, given its index. More... | |
int | GetTranslationID (int index) |
Gets the translation ID of a given text index. More... | |
AC_TextType | GetTranslationType (int index) |
Gets the translation type of a given text index. More... | |
void | UpdateTranslatableString (int index, string updatedText) |
int | GetNumTranslatables () |
Gets the maximum number of possible translatable texts. More... | |
bool | HasExistingTranslation (int index) |
Checks if a given text index has already been assigned a unique translation ID. More... | |
void | SetTranslationID (int index, int _lineID) |
Sets the translation ID of a given text index More... | |
string | GetOwner (int index) |
Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element. More... | |
bool | OwnerIsPlayer (int index) |
Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line. More... | |
bool | CanTranslate (int index) |
Checks if a given text index can and should be translated. More... | |
bool | ReferencesAsset (ActionListAsset actionListAsset) |
List< ActionListAsset > | GetReferencedActionListAssets () |
Public Attributes | |
AC.InteractionSource | interactionSource |
List< ButtonDialog > | options = new List<ButtonDialog>() |
ButtonDialog | selectedOption |
int | lastOption = -1 |
bool | autoPlay = false |
bool | isTimed = false |
float | timer = 5f |
int | defaultOption = 0 |
Protected Member Functions | |
void | RunOption (ButtonDialog _option) |
void | RunDefault () |
IEnumerator | RunOptionCo (ButtonDialog buttonDialog) |
int | ConvertSlotToOption (int slot, bool force=false) |
void | OnEndActionList (ActionList actionList, ActionListAsset actionListAsset, bool isSkipping) |
void | OnEndConversation (Conversation conversation) |
void | OnFinishLoading () |
Protected Attributes | |
float | startTime |
ActiveList | overrideActiveList |
ActiveList | onFinishActiveList |
MenuDialogList | linkedDialogList |
Properties | |
MenuDialogList | LinkedDialogList [get, set] |
This component provides the player with a list of dialogue options that their character can say. Options are display in a MenuDialogList element, and will usually run a DialogueOption ActionList when clicked - unless overrided by the "Dialogue: Start conversation" Action that triggers it.
bool AC.Conversation.AllOptionsBeenChosen | ( | bool | onlyEnabled | ) |
Checks if all options have been chosen at least once by the player
onlyEnabled | If True, then only options that are currently enabled will be included in the check |
bool AC.Conversation.CanTranslate | ( | int | index | ) |
Checks if a given text index can and should be translated.
index | The index of the translatable text |
Implements AC.ITranslatable.
bool AC.Conversation.ConvertGlobalVariableToLocal | ( | int | oldGlobalID, |
int | newLocalID, | ||
bool | isCorrectScene | ||
) |
Converts the Conversations's references from a given global variable to a given local variable
oldLocalID | The ID number of the old global variable |
newLocalID | The ID number of the new local variable |
bool AC.Conversation.ConvertLocalVariableToGlobal | ( | int | oldLocalID, |
int | newGlobalID | ||
) |
Converts the Conversations's references from a given local variable to a given global variable
oldLocalID | The ID number of the old local variable |
newGlobalID | The ID number of the new global variable |
int AC.Conversation.GetCount | ( | ) |
Gets the number of enabled dialogue options.
int [] AC.Conversation.GetIDArray | ( | ) |
<summmary>Gets an array of ID numbers of existing ButtonDialog classes, so that a unique number can be generated.
int AC.Conversation.GetNumEnabledOptions | ( | ) |
Gets the number of dialogue options that are currently enabled.
int AC.Conversation.GetNumTranslatables | ( | ) |
Gets the maximum number of possible translatable texts.
Implements AC.ITranslatable.
int AC.Conversation.GetNumVariableReferences | ( | VariableLocation | location, |
int | varID, | ||
Variables | variables = null , |
||
int | _variablesConstantID = 0 |
||
) |
Gets the number of references to a given variable
location | The location of the variable (Global, Local) |
varID | The ID number of the variable |
Implements AC.IVariableReferencer.
ButtonDialog AC.Conversation.GetOption | ( | int | slot | ) |
Gets the ButtonDialog data container, which stores data for a dialogue option.
slot | The index number of the dialogue option to find |
CursorIconBase AC.Conversation.GetOptionIcon | ( | int | slot | ) |
Gets the display icon of a dialogue option.
slot | The index number of the dialogue option to find |
CursorIconBase AC.Conversation.GetOptionIconWithID | ( | int | ID | ) |
Gets the display icon of a dialogue option with a specific ID.
ID | The ID of the dialogue option to find |
int AC.Conversation.GetOptionID | ( | int | slot | ) |
Gets the ID of a dialogue option.
slot | The index number of the enabled dialogue option to find |
string AC.Conversation.GetOptionName | ( | int | slot | ) |
Gets the display label of a dialogue option.
slot | The index number of the enabled dialogue option to find |
string AC.Conversation.GetOptionNameWithID | ( | int | ID | ) |
Gets the display label of a dialogue option with a specific ID.
ID | The ID of the dialogue option to find |
ButtonDialog AC.Conversation.GetOptionWithID | ( | int | id | ) |
Gets the ButtonDialog data container with a given ID number, which stores data for a dialogue option.
id | The ID number associated with the dialogue option to find |
string AC.Conversation.GetOwner | ( | int | index | ) |
Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element.
index | The index of the translatable text |
Implements AC.ITranslatable.
float AC.Conversation.GetTimeRemaining | ( | ) |
Gets the time remaining before a timed Conversation ends.
string AC.Conversation.GetTranslatableString | ( | int | index | ) |
Gets the text to be translated, given its index.
index | The index of the translatable text |
Implements AC.ITranslatable.
int AC.Conversation.GetTranslationID | ( | int | index | ) |
Gets the translation ID of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
AC_TextType AC.Conversation.GetTranslationType | ( | int | index | ) |
Gets the translation type of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
bool AC.Conversation.HasActionListOverride | ( | ) |
Checks if the Converations options are currently being overridden by an ActionList
bool AC.Conversation.HasExistingTranslation | ( | int | index | ) |
Checks if a given text index has already been assigned a unique translation ID.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.Conversation.Interact | ( | ) |
Show the Conversation's dialogue options.
void AC.Conversation.Interact | ( | ActionList | actionList, |
ActionConversation | actionConversation | ||
) |
Shows the Conversation's dialogue options.
actionList | The ActionList that contains the Action that calls this function |
actionConversation | The "Dialogue: Start conversation" Action that calls this function. This is necessary when that Action overrides the Converstion's options. |
bool AC.Conversation.IsActive | ( | bool | includeResponses | ) |
Checks if the Conversation is currently active.
includeResponses | If True, then the Conversation will be considered active if any of its dialogue option ActionLists are currently-running, as opposed to only when its options are displayed as choices on screen |
True if the Conversation is active
bool AC.Conversation.OptionHasBeenChosen | ( | int | slot | ) |
Checks if a dialogue option has been chosen at least once by the player.
slot | The index number of the dialogue option to find |
bool AC.Conversation.OptionWithIDHasBeenChosen | ( | int | ID | ) |
Checks if a dialogue option with a specific ID has been chosen at least once by the player.
ID | The ID of the dialogue option to find |
bool AC.Conversation.OptionWithIDIsActive | ( | int | ID | ) |
Checks if a dialogue option with a specific ID is active.
ID | The ID of the dialogue option to check for |
bool AC.Conversation.OwnerIsPlayer | ( | int | index | ) |
Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.Conversation.RenameOption | ( | int | id, |
string | newLabel, | ||
int | newLineID | ||
) |
Renames a dialogue option.
id | The ID number of the dialogue option to rename | ||
newLabel | The new label text to give the dialogue option<param>
|
void AC.Conversation.RunOption | ( | int | slot, |
bool | force = false |
||
) |
Runs a dialogue option.
slot | The index number of the dialogue option to run |
force | If True, then the option will be run regardless of whether it's enabled or valid |
void AC.Conversation.RunOptionWithID | ( | int | ID, |
bool | force = false |
||
) |
Runs a dialogue option with a specific ID.
ID | The ID number of the dialogue option to run |
force | If True, then the option will be run regardless of whether it's enabled or valid |
void AC.Conversation.SetOptionState | ( | int | id, |
bool | flag, | ||
bool | isLocked | ||
) |
Sets the enabled and locked states of a dialogue option, provided that it is unlocked.
id | The ID number of the dialogue option to change |
flag | The "on/off" state to set the option |
isLocked | The "locked/unlocked" state to set the option |
void AC.Conversation.SetTranslationID | ( | int | index, |
int | lineID | ||
) |
Sets the translation ID of a given text index
index | The index of the translatable text |
lineID | The new translation ID to assign the translatable text |
Implements AC.ITranslatable.
bool AC.Conversation.SlotIsAvailable | ( | int | slot | ) |
Checks if a given slot exists
slot | The index number of the enabled dialogue option to find |
void AC.Conversation.TurnAllOptionsOn | ( | bool | includingLocked | ) |
Turns all dialogue options on
includingLocked | If True, then locked options will be unlocked and turned on as well. Otherwise, they will remain locked |
void AC.Conversation.TurnOff | ( | ) |
Hides the Conversation's dialogue options, if it is the currently-active Conversation.
void AC.Conversation.TurnOn | ( | ) |
Show the Conversation's dialogue options.
void AC.Conversation.TurnOptionOff | ( | int | id | ) |
Turns a dialogue option off, provided that it is unlocked.
id | The ID number of the dialogue option to disable |
void AC.Conversation.TurnOptionOn | ( | int | id | ) |
Turns a dialogue option on, provided that it is unlocked.
id | The ID number of the dialogue option to enable |
bool AC.Conversation.autoPlay = false |
If True, and only one option is available, then the option will be chosen automatically
int AC.Conversation.defaultOption = 0 |
The index number of the option to select, if isTimed = True and the timer runs out before the player has made a choice. If -1, then the conversation will end
AC.InteractionSource AC.Conversation.interactionSource |
The source of the commands that are run when an option is chosen (InScene, AssetFile, CustomScript)
bool AC.Conversation.isTimed = false |
If True, then the Conversation is timed, and the options will only be shown for a fixed period
int AC.Conversation.lastOption = -1 |
The index number of the last-chosen Conversation dialogue option
List<ButtonDialog> AC.Conversation.options = new List<ButtonDialog>() |
All available dialogue options that make up the Conversation
ButtonDialog AC.Conversation.selectedOption |
The option selected within the Conversation's Inspector
float AC.Conversation.timer = 5f |
The duration, in seconds, that the Conversation is active, if isTime = True