This component synchronizes Adventure Creator data with Dialogue System data. More...
Classes | |
class | SyncSettings |
Public Member Functions | |
virtual void | Start () |
virtual void | OnConversationStart (Transform actor) |
Prepares to run a conversation by freezing AC and syncing data to Lua. | |
virtual void | OnConversationEnd (Transform actor) |
At the end of a conversation, unfreezes AC and syncs Lua back to AC. | |
virtual void | SetConversationGameState () |
Sets GameState to DialogOptions if specified in the properties. | |
virtual void | UnsetConversationGameState () |
Restores the previous GameState if necessary. | |
void | SetGameStateToCutscene () |
Sets AC's GameState to DialogOptions. | |
void | RestorePreviousGameState () |
void | DisableACCameraControl () |
void | EnableACCameraControl () |
void | IdleACCameraControl () |
void | SetConversationCursor () |
Sets the conversation cursor. | |
void | RestorePreviousCursor () |
Restores the previous cursor. | |
virtual void | SyncAdventureCreatorToLua () |
Syncs the AC data to Lua. | |
virtual void | SyncLuaToAdventureCreator () |
Syncs Lua back to AC data. | |
void | SyncVariablesToLua () |
void | SyncLuaToVariables () |
void | SyncInventoryToLua () |
Syncs AC's inventory to Lua. | |
void | SyncLuaToInventory () |
Syncs Lua to AC's inventory. | |
void | GenerateAdventureCreatorLipsyncLines () |
Static Public Member Functions | |
static void | SaveDialogueSystemToGlobalVariable () |
Saves the Dialogue System state to a dedicated AC global variable. | |
static void | LoadDialogueSystemFromGlobalVariable () |
Loads the Dialogue System state from a dedicated AC global variable. | |
static void | UpdateSettingsFromAC () |
static bool | acGetBoolean (string variableName) |
static double | acGetInteger (string variableName) |
static double | acGetFloat (string variableName) |
static string | acGetText (string variableName) |
static void | acSetBoolean (string variableName, bool value) |
static void | acSetInteger (string variableName, double value) |
static void | acSetFloat (string variableName, double value) |
static void | acSetText (string variableName, string value) |
static bool | acGetBooleanOnGO (string goName, string variableName) |
static double | acGetIntegerOnGO (string goName, string variableName) |
static double | acGetFloatOnGO (string goName, string variableName) |
static string | acGetTextOnGO (string goName, string variableName) |
static void | acSetBooleanOnGO (string goName, string variableName, bool value) |
static void | acSetIntegerOnGO (string goName, string variableName, double value) |
static void | acSetFloatOnGO (string goName, string variableName, double value) |
static void | acSetTextOnGO (string goName, string variableName, string value) |
static double | acGetItemCount (string itemName) |
static void | acSetItemCount (string itemName, double value) |
static void | acIncItemCount (string itemName, double value) |
static string | acGetObjectiveState (double objID, string playerName) |
Public Attributes | |
UseDialogState | useDialogState = UseDialogState.IfPlayerInvolved |
The AC GameState to use when in conversations. | |
UseDialogState | takeCameraControl = UseDialogState.IfPlayerInvolved |
Specifies when conversations should take camera control. | |
float | maxTimeToWaitForCameraStop = 10f |
The max time to wait for the camera stop if takeCameraControl is AfterStopIfPlayerInvolved. | |
bool | forceCursorVisibleDuringConversations = true |
SyncSettings | syncSettings = new SyncSettings() |
bool | includeSimStatus = false |
Set true to include dialogue entry status (offered and/or spoken) in save data. | |
bool | prependGlobalVariables = false |
Set true to prepend 'global_' in front of global AC variables in Dialogue System's Variable[] table. | |
bool | saveToGlobalVariableOnConversationEnd = false |
Set true to save the Lua environment to the AC global variable when conversations end. | |
bool | rerunScriptAfterCutscenes = false |
Set true to resolve race conditions between AC() sequencer command and Lua Script on subsequent dialogue entry. | |
bool | useAdventureCreatorLanguage = true |
Set the Dialogue System's localization according to Adventure Creator's current language. | |
bool | useAdventureCreatorSubtitlesSetting = false |
Set the Dialogue System's localization according to Adventure Creator's current subtitle settings. | |
bool | generateAdventureCreatorLipsyncLines = false |
bool | debug = false |
bool | overrideBridge = false |
UseDialogState | overrideUseDialogState = UseDialogState.IfPlayerInvolved |
UseDialogState | overrideTakeCameraControl = UseDialogState.IfPlayerInvolved |
Static Public Attributes | |
static string | DialogueSystemGlobalVariableName = "DialogueSystemEnvironment" |
The name of the AC global variable used to store Dialogue System state. | |
Protected Member Functions | |
virtual void | OnDestroy () |
IEnumerator | SetupSettings () |
void | UpdateAdventureCreatorItem (string itemName, int itemID, int newCount) |
Updates the count of an item in AC's inventory. | |
Static Protected Member Functions | |
static GVar | GetACVariable (string variableName) |
static GVar | GetACVariableFromList (List< GVar > varList, string variableName) |
static GVar | GetACVariableOnGO (string goName, string variableName) |
Properties | |
bool | skipSyncToLua [get, set] |
Set this true to skip the next sync to Lua. | |
UseDialogState | activeUseDialogState [get] |
UseDialogState | activeTakeCameraControl [get] |
This component synchronizes Adventure Creator data with Dialogue System data.
Add it to your Dialogue Manager object. It synchronizes AC's variables with the Dialogue System's Variable[] Lua table, and AC's inventory with the Dialogue System's Item[] Lua table, if the sync checkboxes are ticked. Otherwise you can use the acXXX() Lua functions that this script registers.
It also provides methods to save and load the Dialogue System's state to an AC global variable. You can call these methods when saving and loading games in AC.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inline |
|
inlinestatic |
Loads the Dialogue System state from a dedicated AC global variable.
|
inlinevirtual |
|
inlinevirtual |
Prepares to run a conversation by freezing AC and syncing data to Lua.
actor | The other actor. |
|
inlineprotectedvirtual |
|
inline |
Restores the previous cursor.
|
inline |
|
inlinestatic |
Saves the Dialogue System state to a dedicated AC global variable.
This method will create the global variable if it doesn't already exist.
|
inline |
Sets the conversation cursor.
|
inlinevirtual |
Sets GameState to DialogOptions if specified in the properties.
|
inline |
Sets AC's GameState to DialogOptions.
|
inlineprotected |
|
inlinevirtual |
|
inlinevirtual |
Syncs the AC data to Lua.
|
inline |
Syncs AC's inventory to Lua.
|
inlinevirtual |
Syncs Lua back to AC data.
|
inline |
Syncs Lua to AC's inventory.
|
inline |
|
inline |
|
inlinevirtual |
Restores the previous GameState if necessary.
|
inlineprotected |
Updates the count of an item in AC's inventory.
itemName | Item name. |
itemID | Item ID. |
newCount | New count. |
|
inlinestatic |
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.debug = false |
|
static |
The name of the AC global variable used to store Dialogue System state.
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.forceCursorVisibleDuringConversations = true |
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.generateAdventureCreatorLipsyncLines = false |
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.includeSimStatus = false |
Set true
to include dialogue entry status (offered and/or spoken) in save data.
float PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.maxTimeToWaitForCameraStop = 10f |
The max time to wait for the camera stop if takeCameraControl is AfterStopIfPlayerInvolved.
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.overrideBridge = false |
UseDialogState PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.overrideTakeCameraControl = UseDialogState.IfPlayerInvolved |
UseDialogState PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.overrideUseDialogState = UseDialogState.IfPlayerInvolved |
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.prependGlobalVariables = false |
Set true
to prepend 'global_' in front of global AC variables in Dialogue System's Variable[] table.
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.rerunScriptAfterCutscenes = false |
Set true
to resolve race conditions between AC() sequencer command and Lua Script on subsequent dialogue entry.
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.saveToGlobalVariableOnConversationEnd = false |
Set true
to save the Lua environment to the AC global variable when conversations end.
SyncSettings PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.syncSettings = new SyncSettings() |
UseDialogState PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.takeCameraControl = UseDialogState.IfPlayerInvolved |
Specifies when conversations should take camera control.
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.useAdventureCreatorLanguage = true |
Set the Dialogue System's localization according to Adventure Creator's current language.
bool PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.useAdventureCreatorSubtitlesSetting = false |
Set the Dialogue System's localization according to Adventure Creator's current subtitle settings.
UseDialogState PixelCrushers.DialogueSystem.AdventureCreatorSupport.AdventureCreatorBridge.useDialogState = UseDialogState.IfPlayerInvolved |
The AC GameState to use when in conversations.
|
get |
|
get |
|
getset |
Set this true
to skip the next sync to Lua.
The Conversation action sets this true
because it manually syncs to Lua before the conversation starts.
true
to skip sync to lua; otherwise, false
.