SetPortrait Skipping Dialogue Entry?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
RandomProduct
Posts: 6
Joined: Fri May 29, 2020 10:29 pm

SetPortrait Skipping Dialogue Entry?

Post by RandomProduct »

Hey there

I'm trying to set one of my actor's portraits so I can use different emotions throughout the conversation.

In the sequence section of the Dialogue Entry, I have

Code: Select all

SetPortrait(May,pic=1)
Technically, May is already at pic 1, but I have been having this issue for a bit and wanted to make sure it wasn't an IndexOutOfBounds issue.

Anyway, when I get to that Entry in the conversation, it gets skipped entirely. It just never shows up, and the next one appears instead.

I don't get any errors or warnings in the console. I have all of my character portraits in my Assets/Resources folder, as I saw that note on another post having issues with this function. I also tried putting "required" in front of the function call, but that didn't change anything.

Any ideas on what I've got wrong?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetPortrait Skipping Dialogue Entry?

Post by Tony Li »

Hi,

Set the sequence to:

Code: Select all

SetPortrait(May,pic=1);
{{default}}
or

Code: Select all

SetPortrait(May,pic=1);
Delay({{end}})
A subtitle stays onscreen for the duration of its sequence. The SetPortrait() command finishes instantly, which doesn't give the subtitle any time to show.

The second example above adds an explicit Delay() command that delays for a duration based on the text length.

The first example above includes the Dialogue Manager's Camera & Cutscene Settings > Default Sequence into the sequence. The Dialogue Manager's Default Sequence is originally set to Delay({{end}}), so both examples are effectively the same.

Side note: Another way to keep a subtitle onscreen is to set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always. The subtitle will wait for the player to click the continue button, even if the sequence has finished.
RandomProduct
Posts: 6
Joined: Fri May 29, 2020 10:29 pm

Re: SetPortrait Skipping Dialogue Entry?

Post by RandomProduct »

Ahh, that all helped! Thanks much!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: SetPortrait Skipping Dialogue Entry?

Post by Tony Li »

Glad to help!
Post Reply