Hi,
funcookergames wrote: ↑Thu May 23, 2019 4:29 amRight now I am unable to stop certain portions of my conversations from being non-continuable and I can't get the SetContinueMode or 'required' part to function (I could be misunderstanding) from stopping a player from continuing before another action continues.
You could update the code to check if the cube is dropping -- or, more generally, if the continue button is currently allowed. For example, change this:
Code: Select all
if (Input.GetKeyDown(KeyCode.Escape)) // Did user press Escape?
to:
Code: Select all
// Did user press Escape AND is continue allowed right now?
if (Input.GetKeyDown(KeyCode.Escape) && DialogueManager.displaySettings.subtitleSettings.continueButton == DisplaySettings.SubtitleSettings.ContinueButtonMode.Always)
Then use the SetContinueMode() sequencer command to specify whether the player is allowed to continue. For example, to prevent continue until CubeLanded:
Code: Select all
SetContinueMode(false);
required SetContinueMode(true)@Message(CubeLanded)
Or to prevent continue during an animation:
Code: Select all
SetContinueMode(false);
AnimatorPlayWait(CubeDance)->Message(FinishedDancing);
required SetContinueMode(true)@Message(FinishedDancing)
Or to prevent continue until the player completes some gameplay action such as jumping:
Code: Select all
SetContinueMode(false);
required SetContinueMode(true)@Message(Jumped)
and in a C# script, send "Jumped" to the sequencer:
Code: Select all
if (Input.GetButtonDown("Jump"))
{
cube.Jump();
Sequencer.Message("Jumped");
}
---
funcookergames wrote: ↑Thu May 23, 2019 4:29 amAlso... I am throwing the following error whenever I reset my level.
"MissingReferenceException: The object of type 'TextMeshProDialogueUI' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object."
Would you please click on that message in the Console window, press Ctrl+C to copy it to the clipboard, and then paste the clipboard into a reply here? It will include the stack trace that will tell me what's generating the error.
I understand you've already set up your dialogue UI, so take this next suggestion with a grain of salt. TextMeshProDialogueUI is the older script for supporting TextMesh Pro and is primarily included for older projects that were made before the Standard Dialogue UI was introduced. The preferred way now is to
enable TextMesh Pro support for the Standard Dialogue UI system. However, this would require you to remove the TextMeshProDialogueUI script, and add and configure the StandardDialogueUI scripts. If you're happy with the way your dialogue UIs are working right now, it's probably easiest to leave them as-is.