I want to move on to the next line when I want

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

I want to move on to the next line when I want

Post by SBSun »

When I tested the dialogue in the attached photo, it automatically jumped from line 1 to line 2.

I want to move to the next line when I want. Is it possible to set this in the script?
Attachments
캡처.PNG
캡처.PNG (28.17 KiB) Viewed 245 times
User avatar
Tony Li
Posts: 21970
Joined: Thu Jul 18, 2013 1:27 pm

Re: I want to move on to the next line when I want

Post by Tony Li »

Hi,

What do you mean by "when I want?"

If you want to move on to the next line by clicking a button, set the Dialogue Manager's Display Settings > Subtitle Settings > Continue Button dropdown to Always.

If you want to move on from a script, please see Cutscene Sequences. If the line is not showing a continue button, it will move to the next line when its Sequence is done. You can set the Sequence to something like: WaitForMessage(NextLine)

Then in C# you can use:

Code: Select all

PixelCrushers.DialogueSystem.Sequencer.Message("NextLine");
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: I want to move on to the next line when I want

Post by SBSun »

In the script, I want the developer to move on to the next line when they want.

For example, there may be times when a certain key is pressed.

And I wonder if one of the two lines can be selected according to the conditions set by the developer in the script instead of the user selecting one.
Attachments
캡처.PNG
캡처.PNG (10.56 KiB) Viewed 233 times
User avatar
Tony Li
Posts: 21970
Joined: Thu Jul 18, 2013 1:27 pm

Re: I want to move on to the next line when I want

Post by Tony Li »

Hi,
SBSun wrote: Mon Sep 12, 2022 12:21 pmIn the script, I want the developer to move on to the next line when they want.

For example, there may be times when a certain key is pressed.
Use WaitForMessage() and the C# method Sequencer.Message() as I described above. Or, if you have turned on Continue Button mode, call DialogueManager.standardDialogueUI.OnContinue() in C# or the Continue() sequencer command.
SBSun wrote: Mon Sep 12, 2022 12:21 pmAnd I wonder if one of the two lines can be selected according to the conditions set by the developer in the script instead of the user selecting one.
Yes. It will be best of you assign an NPC to those lines. (They will appear gray instead of blue in the editor.) Register your C# function with Lua. Then use those C# functions in the lines' Conditions fields. More info: Conditions Tutorial
Post Reply