Create Game Instruction/Tutorial for the player in visual novel

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
llizzyff
Posts: 4
Joined: Tue Mar 14, 2023 8:23 am

Create Game Instruction/Tutorial for the player in visual novel

Post by llizzyff »

Hi,
I searched in this forum but didn't find a suitable answer. I want to create a sort of Tutorial for the player of my game.
Everytime something in the game happens for the first time, I want the Dialogue System to notice that and show Game Instructions in a different Dialogue UI. I tried to do it via Quests/variables but somehow the conversation with the instructions never gets started. In some cases the tutorial should start after another conversation ended. So I changed a variable at the end of the conversation which is checked in the tutorial conversation whether it should display the conversation.
Which trigger should I use for the Tutorial-Gameobject DS Trigger Component? I tried ON USE, ON START, ON ENABLE, but didn't work as intended. I considered that maybe the DS Trigger is triggered when the scene starts and does not constantly check for variables? Or rather when the variable value changes, the conversation cannot start again because it already did but there was nothing to display because variable was false. Does somebody know what I could do? I would be very thankful.
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Create Game Instruction/Tutorial for the player in visual novel

Post by Tony Li »

Hi,

Here's an example scene:

DS_TutorialExample_2023-03-14.unitypackage

The Dialogue Manager has a child GameObject named Check Tutorials. This GameObject has Dialogue System Triggers set to OnConversationEnd that start tutorial conversations if the conditions are appropriate. It also has a Timed Event component that allows the scene to check the Dialogue System Triggers at times other than when a conversation has ended.

The scene has two buttons: Conversation and Click Me.

If you click Conversation, it will play a regular conversation and set a variable true. When the conversation is done, a Dialogue System Trigger on Check Tutorials will see that the variable is true, and it will start a tutorial conversation if it hasn't already played.

If you click the Click Me button, it will set another variable true and start the Timed Event on Check Tutorials. The second Dialogue System Trigger on Check Tutorials will see that the variable is true, and it will start another tutorial conversation if it hasn't already played.

You can click the Click Me button in or out of a conversation. If you click it while no conversations are playing, it will work as described above (using Timed Event). If you click it while conversations are playing, it will set the variable true, and a Dialogue System Trigger on Check Tutorials will handle it in OnConversationEnd.

In the Console window, you may in some circumstances see an ignorable warning that it won't start a conversation because another conversation is already active. This is fine, and is in fact exactly what you want to happen in this case.

This example doesn't use any scripting. If you prefer to handle this through scripting instead, that's totally fine, too.
llizzyff
Posts: 4
Joined: Tue Mar 14, 2023 8:23 am

Re: Create Game Instruction/Tutorial for the player in visual novel

Post by llizzyff »

Thank you very much! This works as intended from me.
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Create Game Instruction/Tutorial for the player in visual novel

Post by Tony Li »

Glad to help!
Post Reply