Page 1 of 1

Setting Up Tutorial For Players

Posted: Fri May 03, 2024 6:28 pm
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).

Re: Setting Up Tutorial For Players

Posted: Fri May 03, 2024 7:04 pm
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 622 times

Re: Setting Up Tutorial For Players

Posted: Sat May 04, 2024 12:19 am
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
}

Re: Setting Up Tutorial For Players

Posted: Sat May 04, 2024 12:27 am
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;

Re: Setting Up Tutorial For Players

Posted: Sat May 04, 2024 1:16 am
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?

Re: Setting Up Tutorial For Players

Posted: Sat May 04, 2024 9:01 am
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)