Disable skipping dialog lines temporarily

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
kyuubi
Posts: 52
Joined: Fri May 27, 2016 11:30 pm

Disable skipping dialog lines temporarily

Post by kyuubi »

Hi Tony,
Is there a way for me to prevent skipping dialog lines sometimes?
In Adventure Creator cutscenes I would like to prevent the player from skipping dialog lines (he can already skip the entire cutscene).
Any way I can achieve this easily?
Cheers,
Duarte
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable skipping dialog lines temporarily

Post by Tony Li »

Hi Duarte,

In the Dialogue System, there are two ways the player can skip a dialog line:

1. Press the key or button assigned to the Dialogue Manager's Input Settings > Cancel. This

2. Or click the dialogue UI's continue button.

To disable the Dialogue Manager's Input Settings > Cancel, set the Key to None and the Button to a blank string.

To disable the continue button, set the Dialogue Manager's Subtitle Settings > Continue Button to None. To disable it only on specific dialog lines, use the SetContinueMode() sequencer command:
  • NPC: "I'm about to remove the gall bladder, students."
    • NPC: "Pay attention and don't interrupt me..."
      Sequence: SetContinueMode(false); Animation(surgery); SetContinueMode(original)@{{end}}
      • NPC: "All done. Now you can interrupt me."
User avatar
kyuubi
Posts: 52
Joined: Fri May 27, 2016 11:30 pm

Re: Disable skipping dialog lines temporarily

Post by kyuubi »

Hi Tony,
I only want to disable skipping (using the cancel key) on certain conversations.
It seems for that purpose I need to apply the Sequence commands within each node of the conversation, which is fine.
Thanks again Tony!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable skipping dialog lines temporarily

Post by Tony Li »

The Dialogue Manager's Input Settings > Cancel key is global. I recommend setting it to none/blank, and using the continue button mode instead. You can set the continue button mode for a specific conversation by inspecting the conversation's properties and ticking Override Display Settings and then Subtitle Settings.

Another option (which requires scripting) is to keep using the Dialogue Manager's Cancel key and manually set it to the key/button or none/blank depending on the conversation.
User avatar
kyuubi
Posts: 52
Joined: Fri May 27, 2016 11:30 pm

Re: Disable skipping dialog lines temporarily

Post by kyuubi »

Hi Tony,
Any chance you can tell me what method is available to override the cancel button?
I can write a custom Adventure Creator action that calls it to change it to none and then back to original after the conversation is over.
Thanks,
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable skipping dialog lines temporarily

Post by Tony Li »

Hi,

Why not disable the Dialogue System's cancel input entirely? Inspect the Dialogue Manager, and set Input Settings > Cancel and Cancel Conversation to Key = None, Button = (blank string).

Otherwise you can set DialogueManager.DisplaySettings.inputSettings.cancel and .cancelConversation.

This may be unrelated, but if you need to control the continue button, you can use the sequencer command or script code in this post to control the continue button.
User avatar
kyuubi
Posts: 52
Joined: Fri May 27, 2016 11:30 pm

Re: Disable skipping dialog lines temporarily

Post by kyuubi »

Hi Tony,
Maybe easier to explain what I'm trying to do.
I don't want to have any continue buttons or anything like that. Just a key that you can press to skip dialogs. So far I have only been able to see the cancel key (currently the ".").
However, when playing conversation in cutscenes, I don't want the player to skip them. He can skip the cutscene entirely, but not the dialogs themselves.
Seems that the best way to do this is to override the cancel button?
Thanks,
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Disable skipping dialog lines temporarily

Post by Tony Li »

Hi,

That might be easiest. When the cutscene starts:

Code: Select all

DialogueManager.DisplaySettings.inputSettings.cancel.key = KeyCode.None;
When the cutscene ends:

Code: Select all

DialogueManager.DisplaySettings.inputSettings.cancel.key = KeyCode.Period;
You may also want to set DialogueManager.DisplaySettings.inputSettings.cancelConversation.key. The Dialogue System checks for this key when the response menu is visible. If it's pressed, it stops the entire conversation.
User avatar
kyuubi
Posts: 52
Joined: Fri May 27, 2016 11:30 pm

Re: Disable skipping dialog lines temporarily

Post by kyuubi »

Thanks Tony,
This looks like just what I need.
Cheers!
Post Reply