Page 1 of 1

Bug with Skipping Player Response Subtitles

Posted: Fri Feb 12, 2016 6:59 pm
by mcarriere
Before I describe the bug, I'll describe what I'm trying to achieve, perhaps there's a way around this:

Some of my conversations are my player simply talking to itself, or oftentimes I only want a single response from the player to the NPC, where it's shown as a subtitle, not as a response choice. Because of this, I have "Show PC Subtitles During Line" turned on.

That being said, I've been requested to make the conversation skip over showing the response subtitle when the player just selected it. In my DialogueUI, I keep track of response.destinationEntry.id before I mark it as the selected response, and if the subtitle has that same id, I immediately send the Continue() message to skip over it.

The bug is, that if you send the Continue() message during Show(), the System Controller doesn't respect the "Not Before Response Menu" setting.

My current workaround for this is to use a Coroutine to delay the Continue message by a single frame, which works, but feels incredibly hacky.

If there's a better way to get around this, please let me know!

Re: Bug with Skipping Player Response Subtitles

Posted: Fri Feb 12, 2016 10:49 pm
by Tony Li
What about this:

Set the Dialogue Manager's Camera Settings > Default Player Sequence to:

Code: Select all

SendMessage(OnContinue,,Dialogue Manager,broadcast)
This makes all PC lines immediately simulate a button click by default.

In PC dialogue entries where you want to show the subtitle, set the Sequence field to:

Code: Select all

None()
so it doesn't use the Default Player Sequence. Or, if you want to add a delay, set it to:

Code: Select all

Delay({{end}})
This doesn't require any scripting, but it requires the writer to set the Sequence field for single-response PC entries. Alternatively, if you want to control this in your dialogue UI script's ShowSubtitle method, you could set subtitle.sequence to one of the above strings before calling the base method. For example, to simulate a continue button click:

Code: Select all

subtitle.sequence = "SendMessage(OnContinue,,Dialogue Manager,broadcast)";
base.ShowSubtitle(subtitle);