how to end the game?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
AvivXR
Posts: 19
Joined: Wed Jun 19, 2024 4:17 pm

how to end the game?

Post by AvivXR »

Hi,
Probably a stupid question,
I've created a visual novel game. I am using the visual novel template so I have a Start scene, a Gameplay scene and a Credit.
Each conversation in the game is linked to the next conversation
How do I link the end of the last conversation to the opening scene \ credit scene?

Thanks
Aviv
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: how to end the game?

Post by Tony Li »

Hi,

In the last dialogue entry of the conversation (which can be an empty entry if you prefer), set the Sequence to something like:

Code: Select all

required LoadLevel(Credits);
Continue()
This will load the scene named Credits.
AvivXR
Posts: 19
Joined: Wed Jun 19, 2024 4:17 pm

Re: how to end the game?

Post by AvivXR »

Thank you, That worked though I added a back button in the credits to load the Start scene.

Last thing...(I hope) I would like also to let users skip back and replay certain dialogues (chapters);
In the achievement panel, I added buttons for each dialogue chapter.

I've tried using this code DialogueManager.StartConversation("Chapter05");
but it didn't seem to effect the flow.
Any quick solution?

Aviv
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: how to end the game?

Post by Tony Li »

When you run DialogueManager.StartConversation("Chapter05"); to "jump" to "Chapter05", you may see a warning like this in the Console:

Dialogue Manager: Not starting 'Chapter05'. Another conversation is already active.

To resolve this, use:

Code: Select all

DialogueManager.StopConversation();
DialogueManager.StartConversation("Chapter05");
Alternatively, which might give you a cleaner transition depending on your dialogue UI setup, you could jump to the first dialogue entry in Chapter05 using code like this.
AvivXR
Posts: 19
Joined: Wed Jun 19, 2024 4:17 pm

Re: how to end the game?

Post by AvivXR »

Brilliant!!!
That worked!
Thank you!
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: how to end the game?

Post by Tony Li »

Glad to help!
Post Reply