Page 1 of 1

how to end the game?

Posted: Sat Aug 03, 2024 5:50 am
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

Re: how to end the game?

Posted: Sat Aug 03, 2024 1:29 pm
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.

Re: how to end the game?

Posted: Sun Aug 04, 2024 4:35 am
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

Re: how to end the game?

Posted: Sun Aug 04, 2024 8:49 am
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.

Re: how to end the game?

Posted: Mon Aug 05, 2024 1:51 am
by AvivXR
Brilliant!!!
That worked!
Thank you!

Re: how to end the game?

Posted: Mon Aug 05, 2024 8:11 am
by Tony Li
Glad to help!