Page 1 of 1

Avoid auto conversation advance on click

Posted: Tue Nov 06, 2018 11:37 am
by forrestuv
Hi!
I need to control my conversation totally via code. I don't want dialoguesystem to go to next conversation entry automatically. (after responses and after continue)
I've extended StandardDialogueUI but (for example)I have no control over the OnClick event since it will go to the next entry in any case.

What's the easiest way to do this?

thx

Re: Avoid auto conversation advance on click

Posted: Tue Nov 06, 2018 12:04 pm
by Tony Li
Hi,

Subtitles
A dialogue entry's subtitle remains onscreen until the entry's Sequence is done, or until it's manually continued. Try this:

1. Set the Dialogue Manager's Input Settings > Cancel and Cancel Conversation sections to Key=None, Button=(blank string). This will prevent the player from manually advancing the conversation by pressing the Cancel input.

2. Set the Dialogue Manager's Camera & Cutscene Settings > Default Sequence to: WaitForMessage(Forever)

3. When you want to advance past the subtitle, call the dialogue UI's OnConversationConversation() method.

Response Menus
When you click a response menu button, it calls the dialogue UI's OnClick method. This method is virtual. You can override it. For example:

Code: Select all

Response response;

public override void OnClick(object data)
{
    Record the response, but don't act on it yet:
    response = data as Response;
}

void SomeTimeLater()
{
    DialogueManager.conversationView.SelectResponse(new SelectedResponseEventArgs(response));
}

Re: Avoid auto conversation advance on click

Posted: Tue Nov 06, 2018 2:51 pm
by forrestuv
Hi,
after calling DialogueManager.conversationView.SelectResponse() , the Sequencer Update() routine, calls FinishSequence() that starts automatically the next Subtitle. :(

Edit: maybe it's because I didn't change Default Sequence to: WaitForMessage?
I didn't touch it cause I want to keep others UiDialogues working as usual and just this one with total code control.
Is it possible? (I don't use Camera or Cutscenes btw)

thx

Re: Avoid auto conversation advance on click

Posted: Tue Nov 06, 2018 3:38 pm
by Tony Li
You can set a Default Sequence specifically for a single conversation. Inspect the conversation in the Dialogue Editor. Click on empty canvas space to see the conversation's properties. Tick Override Display Settings, Sequence Settings.

SelectResponse() is supposed to start the next subtitle -- or the subtitle for the response, if you've ticked the Dialogue Manager's Show PC Subtitles During Line and unticked Skip PC Subtitle After Response Menu. Don't call it until you're ready to show the next subtitle.

If you really want to call SelectResponse() but you don't want to show the next subtitle yet, override the StandardDialogueUI's ShowSubtitle method to make it wait for whatever you want to wait for.

If this information doesn't help, please post more details and/or diagrams of what you want to do. I want to make sure I understand what you want to do so I can give you the correct info.