Unskippable cutscene

Announcements, support questions, and discussion for the Dialogue System.
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Unskippable cutscene

Post by igorsandman »

Hi,
I'm trying to make my first cutscene with Dialogue System.
I would like my cutscene to be unskippable. I tried playing with "required" and SetContinueMode(), but I couldn't get the result I want.
My sequences are each in their individual dialogue entries and separated by dialogue lines (so it looks more or less like this: characters talk > animation > characters talk > animation etc). I would like to ensure that the dialogue entry holding sequences are playing until the end, preventing the player from skipping those specific entries.

Maybe I'm missing something in the settings of the Dialogue Manager game object?

How can do this?

PS: I have a long list of other unrelated questions. Should I create an individual thread for each, or should I ask them all here?
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unskippable cutscene

Post by Tony Li »

Hi,

You can use SetContineMode(false) to turn off the continue button, and thus the ability to click it to skip the node. However, it will not affect the inputs defined in the Dialogue Manager's Display Settings > Input Settings > Cancel Subtitle Panel and Cancel Conversation Input sections. You may want to set those sections' Key Codes to None, and leave the Button Names blank.
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Unskippable cutscene

Post by igorsandman »

If I do that, how do I make it so the player can skip the following nodes (that contain dialogue). I tried to SetContinueMode(true) at the end of my unskippable sequence but it doesn't work.
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unskippable cutscene

Post by Tony Li »

Hi,

SetContinueMode(true) should work. It will enable the continue button. Make sure your subtitle panel has a continue button. If the Dialogue Manager GameObject's Input Device Manager component has determined that the player is using a joystick, or if Always Auto Focus is ticked, it will focus (select) the continue button so the Unity UI EventSystem's 'Submit' input (e.g., 'A' button or Enter key) will click it. If you want to assign a hotkey to the continue button, add a UI Button Key Trigger component to it.
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Unskippable cutscene

Post by igorsandman »

I've added a button to the Bubble prefab and assigned it. the SetDialogueMode(true) activates the button.
What is that button supposed to do? Do I assign something to its OnClick event? Do I need to write my own script for that?
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unskippable cutscene

Post by Tony Li »

Hi,

You can configure the continue button's OnClick() event to call the subtitle panel's or dialogue UI's OnContinue() method. Alternatively, if you want the first click to skip the typewriter to the end and the second click to actually advance the conversation, set up a StandardUIContinueButtonFastForward component on the continue button. For an example, see any of the dialogue UI prefabs, such as Basic Standard Dialogue UI.
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Unskippable cutscene

Post by igorsandman »

Hi,
I think I'm almost there but it isn't working yet.

I set the OnClick to StandardUISubtitlePanel.OnContinue from the bubble prefab.
I debug.log the currently selected object to make sure the button is selected and it prints the correct object.
I added the SetContinueMode(true)

But when I submit, nothing happens.

Dialogue Manager > Input Device manager > Submit button is set correctly. there must be something else I'm missing.
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unskippable cutscene

Post by Tony Li »

Hi,

Are there any errors or warnings in the Console window?

Make sure your scene has an EventSystem.

Keep an Inspector view open on the scene's EventSystem. After SetContinueMode(true), the EventSystem should show that the continue button is selected.

If so, press the Submit input that's assigned to the EventSystem's Standalone Input Module > Submit input. This input is defined in the Input Manager (menu item Edit > Project Settings > Input).
igorsandman
Posts: 35
Joined: Fri Jul 09, 2021 9:50 am

Re: Unskippable cutscene

Post by igorsandman »

Hi,
There are no errors or warnings in the console.

There is an event system. My menus are working properly, it's only the dialogue that doesn't work since I removed the Dialogue Manager's Display Settings > Input Settings > Cancel Subtitle Input and Cancel Conversation Input sections. It used to work before I removed that, but it allowed the player to skip the dialogue entry.

The proper button is selected (as mentioned earlier)

I'm pressing the proper Submit button, set up in Rewired (I have attached an Input Device Manager Rewired component to the Dialogue Manager). I tried pressing cancel and every other button, but it isn't working.
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unskippable cutscene

Post by Tony Li »

Hi,

Cancel Subtitle Input works doesn't observe SetContinueMode(), since it's "cancelling" the subtitle instead of "continuing" it.

When you press the Submit input, does your continue button visually show that it's being clicked?

As a test, please assign the Basic Standard Dialogue UI to the Dialogue Manager's Dialogue UI field. Does its continue button work when you press the Submit input?
Post Reply