Setting Up Tutorial For Players

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DeidreReay
Posts: 93
Joined: Wed Jan 22, 2020 1:20 pm

Setting Up Tutorial For Players

Post by DeidreReay »

So having a couple issues trying to set things up for players having a tutorial.
My thought was.
1.) Attach Dialogue System Trigger to player. have it que to go on start.
2.) That leads towards a node that would Continue from it Instantly (To two other nodes with variable condition)
3.) One node would be for players variable false that they have not choosen do tutorial or not. and that would give them option to choose a yes or no (then que that variable to true.)
4.) other for it is true and would just close out end conversation.

This makes sense in my head, but maybe you have a better Idea? Also can you help me with what sequence events I would need or want for number 2, nad number 4 (to continue quickly to next nodes, and the kill convesation off. I figure that way if they already have choosen to do or not do tutorial. On reload it still go through that quick step, but without them really ever seeing anything. (We have a loading screen ui that would block out anything for 5 seconds).
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting Up Tutorial For Players

Post by Tony Li »

Hi,

Here's how I recommend setting it up:

Use a Dialogue System variable to record whether the player has done the tutorial or not (e.g., "DidTutorial").

On your Dialogue System Trigger:
  • Set the Trigger dropdown to OnSaveDataApplied. (This works the same as OnStart except if a saved game is being loaded it waits for the load to finish first.)
  • Set Conditions > Lua Conditions to: Variable["DidTutorial"] == false
  • Select Add Action > Run Lua Code. Set the Lua Code field to: Variable["DidTutorial"] = true
  • Select Add Action > Start Conversation. Select your tutorial conversation.
The tutorial conversation will only run if DidTutorial is false, so you only need to ask the player if they want to do the tutorial or not. So it can look as simple as this:

tutorial.png
tutorial.png (27.65 KiB) Viewed 585 times
DeidreReay
Posts: 93
Joined: Wed Jan 22, 2020 1:20 pm

Re: Setting Up Tutorial For Players

Post by DeidreReay »

Great. on a seperate note. is there a way to check a variable through code?
Dealing with the cursor and not wanting that to pop up if they already have answered that tutorial question etc.

Basically,

if (variable.tutorialquestion == true)
{
Do stuff
}
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting Up Tutorial For Players

Post by Tony Li »

Hi,

Yes, you can use DialogueLua.GetVariable() to check a Dialogue System variable in C# code, such as:

Code: Select all

bool DialogueLua.GetVariable("DidTutorial").asBool;
DeidreReay
Posts: 93
Joined: Wed Jan 22, 2020 1:20 pm

Re: Setting Up Tutorial For Players

Post by DeidreReay »

Perfect.
Last question I hope.
Right now we have the typewriter effect going, but the Players Choices of dialogue are not show, until they actually click the left mouse button. Then they pop up and they can choose.
Is there a setting somewhere to make those popup even if we using typewriter stuff?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting Up Tutorial For Players

Post by Tony Li »

Hi,

Try this:

Inspect your conversation in the Dialogue Editor.

Select Menu > Conversation Properties.

Tick Override Display Settings > Subtitle Settings. Set Continue Button to Never.

Then tick Sequence Settings. Set Default Sequence to: Continue()@Message(Typed)
Post Reply