Have dialogue occur after cutscene event

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Have dialogue occur after cutscene event

Post by soniclinkerman »

Hey!

I created an opening cutscene for my game and I only want it to play after that cutscene has ended. I tried doing this by simply turning on the gameobject that contains that specific dialogue AFTER the cutscene ends via Unity animation and it works when I'm in Unity, but for some reason, it doesn't work when I create a build of the game. Is there a workaround?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Have dialogue occur after cutscene event

Post by Tony Li »

Hi,

Another way to do it is to set a Dialogue System Trigger to OnUse. At the end of the cutscene, call its DialogueSystemTrigger.OnUse method.

In either case, there shouldn't be any difference between a build and editor playmode. However, keep in mind that the Dialogue Manager GameObject survives scene changes by default. Say you have a Dialogue Manager in scene 0 and a differently-configured Dialogue Manager in scene 1. If you play scene 1 directly in the editor, it will use scene 1's Dialogue Manager. However, if you play a build, scene 0's Dialogue Manager will survive into scene 1 and replace scene 1's Dialogue Manager.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: Have dialogue occur after cutscene event

Post by soniclinkerman »

Does this still apply even if one of them is turned off?

For example, the way I have it set up is like this:

Scene 0(Main menu)
Start game
Scene 1(Level 1)

This is where the cutscene will happen and once done, the dialogue is meant to happen, I believe it's using the Main Menu's dialogue manager since I made sure to disable scene 1's dialogue system beforehand.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: Have dialogue occur after cutscene event

Post by soniclinkerman »

UPDATE:

Ok I think I fixed it. I just needed to make the specific conversation I needed to be inactive at the start and then make it active once the cutscene ended
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Have dialogue occur after cutscene event

Post by Tony Li »

Great! Sounds like it's working now.
Post Reply