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. More... | |
virtual void | OnConversationEnd (Transform actor) |
At the end of a conversation, unfreezes AC and syncs Lua back to AC. More... | |
virtual void | SetConversationGameState () |
Sets GameState to DialogOptions if specified in the properties. More... | |
virtual void | UnsetConversationGameState () |
Restores the previous GameState if necessary. More... | |
void | SetGameStateToCutscene () |
Sets AC's GameState to DialogOptions. More... | |
void | RestorePreviousGameState () |
void | DisableACCameraControl () |
void | EnableACCameraControl () |
void | IdleACCameraControl () |
void | SetConversationCursor () |
Sets the conversation cursor. More... | |
void | RestorePreviousCursor () |
Restores the previous cursor. More... | |
virtual void | SyncAdventureCreatorToLua () |
Syncs the AC data to Lua. More... | |
virtual void | SyncLuaToAdventureCreator () |
Syncs Lua back to AC data. More... | |
void | SyncVariablesToLua () |
void | SyncLuaToVariables () |
void | SyncInventoryToLua () |
Syncs AC's inventory to Lua. More... | |
void | SyncLuaToInventory () |
Syncs Lua to AC's inventory. More... | |
Static Public Member Functions | |
static void | SaveDialogueSystemToGlobalVariable () |
Saves the Dialogue System state to a dedicated AC global variable. More... | |
static void | LoadDialogueSystemFromGlobalVariable () |
Loads the Dialogue System state from a dedicated AC global variable. More... | |
static void | UpdateSettingsFromAC () |
Public Attributes | |
UseDialogState | useDialogState = UseDialogState.IfPlayerInvolved |
The AC GameState to use when in conversations. More... | |
UseDialogState | takeCameraControl = UseDialogState.IfPlayerInvolved |
Specifies when conversations should take camera control. More... | |
float | maxTimeToWaitForCameraStop = 10f |
The max time to wait for the camera stop if takeCameraControl is AfterStopIfPlayerInvolved. More... | |
SyncSettings | syncSettings = new SyncSettings() |
bool | includeSimStatus = false |
Set true to include dialogue entry status (offered and/or spoken) in save data. More... | |
bool | prependGlobalVariables = false |
Set true to prepend 'global_' in front of global AC variables in Dialogue System's Variable[] table. More... | |
bool | saveToGlobalVariableOnConversationEnd = false |
Set true to save the Lua environment to the AC global variable when conversations end. More... | |
bool | saveToGlobalVariableOnLevelChange = false |
Set true to save the Lua environment to the AC global variable when changing levels. More... | |
bool | rerunScriptAfterCutscenes = false |
Set true to resolve race conditions between AC() sequencer command and Lua Script on subsequent dialogue entry. More... | |
bool | useAdventureCreatorLanguage = true |
Set the Dialogue System's localization according to Adventure Creator's current language. More... | |
bool | useAdventureCreatorSubtitlesSetting = false |
Set the Dialogue System's localization according to Adventure Creator's current subtitle settings. More... | |
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. More... | |
Protected Member Functions | |
void | UpdateAdventureCreatorItem (string itemName, int itemID, int newCount) |
Updates the count of an item in AC's inventory. More... | |
Properties | |
bool | skipSyncToLua [get, set] |
Set this true to skip the next sync to Lua. More... | |
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.
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.
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.DisableACCameraControl | ( | ) |
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.EnableACCameraControl | ( | ) |
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.IdleACCameraControl | ( | ) |
|
static |
Loads the Dialogue System state from a dedicated AC global variable.
|
virtual |
|
virtual |
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.RestorePreviousCursor | ( | ) |
Restores the previous cursor.
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.RestorePreviousGameState | ( | ) |
|
static |
Saves the Dialogue System state to a dedicated AC global variable.
This method will create the global variable if it doesn't already exist.
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SetConversationCursor | ( | ) |
Sets the conversation cursor.
|
virtual |
Sets GameState to DialogOptions if specified in the properties.
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SetGameStateToCutscene | ( | ) |
Sets AC's GameState to DialogOptions.
|
virtual |
|
virtual |
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncInventoryToLua | ( | ) |
|
virtual |
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncLuaToInventory | ( | ) |
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncLuaToVariables | ( | ) |
void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncVariablesToLua | ( | ) |
|
virtual |
Restores the previous GameState if necessary.
|
protected |
|
static |
|
static |
The name of the AC global variable used to store Dialogue System state.
bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.includeSimStatus = false |
Set true
to include dialogue entry status (offered and/or spoken) in save data.
float PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.maxTimeToWaitForCameraStop = 10f |
The max time to wait for the camera stop if takeCameraControl is AfterStopIfPlayerInvolved.
bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.overrideBridge = false |
UseDialogState PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.overrideTakeCameraControl = UseDialogState.IfPlayerInvolved |
UseDialogState PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.overrideUseDialogState = UseDialogState.IfPlayerInvolved |
bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.prependGlobalVariables = false |
bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.rerunScriptAfterCutscenes = false |
Set true
to resolve race conditions between AC() sequencer command and Lua Script on subsequent dialogue entry.
bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.saveToGlobalVariableOnConversationEnd = false |
bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.saveToGlobalVariableOnLevelChange = false |
SyncSettings PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.syncSettings = new SyncSettings() |
UseDialogState PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.takeCameraControl = UseDialogState.IfPlayerInvolved |
Specifies when conversations should take camera control.
bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.useAdventureCreatorLanguage = true |
Set the Dialogue System's localization according to Adventure Creator's current language.
bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.useAdventureCreatorSubtitlesSetting = false |
Set the Dialogue System's localization according to Adventure Creator's current subtitle settings.
UseDialogState PixelCrushers.DialogueSystem.AdventureCreator.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
.