Page 1 of 1

Have dialogue occur after cutscene event

Posted: Thu Jun 10, 2021 10:23 am
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?

Re: Have dialogue occur after cutscene event

Posted: Thu Jun 10, 2021 10:27 am
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.

Re: Have dialogue occur after cutscene event

Posted: Thu Jun 10, 2021 10:46 am
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.

Re: Have dialogue occur after cutscene event

Posted: Thu Jun 10, 2021 11:28 am
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

Re: Have dialogue occur after cutscene event

Posted: Thu Jun 10, 2021 11:30 am
by Tony Li
Great! Sounds like it's working now.