Page 1 of 1

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

Posted: Mon Sep 12, 2022 2:56 am
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?

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

Posted: Mon Sep 12, 2022 8:11 am
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");

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

Posted: Mon Sep 12, 2022 12:21 pm
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.

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

Posted: Mon Sep 12, 2022 2:06 pm
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