Override Portraits during a full conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Override Portraits during a full conversation

Post by Alatriste »

Hi,

I wondering whether there is a way to set up a conversation with different portraits that the ones are assigned by default. I played a bit with the variables in "All Fields" but it didn't work.

I'm asking because during some conversations my characters are wearing outside clothes, while inside, they don't wear coats. I was doing this using the [pic=#] option but shouldn't be an easier/faster way to do this? Also when I have an answering branch, the system shows the default portrait for the actor player, so sometimes it will be wrong.
User avatar
Tony Li
Posts: 21079
Joined: Thu Jul 18, 2013 1:27 pm

Re: Override Portraits during a full conversation

Post by Tony Li »

Hi,

Use the SetPortrait() sequencer command.

Let's say pic 1 is Ned's inside clothes, and pic 2 is Ned's outside clothes.

If you're playing an outside conversation, put this sequencer command in the first node:

Code: Select all

SetPortrait(Ned, pic=2)
Ned will permanently use pic 2 until you change it with another SetPortrait() command.

You can also change the portrait to any texture inside a Resources folder. For example, say Ned is in outer space, and the Resources folder contains an image named Spacesuit:

Code: Select all

SetPortrait(Ned, Spacesuit)
Alatriste wrote: Sun Jun 24, 2018 6:11 amAlso when I have an answering branch, the system shows the default portrait for the actor player, so sometimes it will be wrong.
I'll investigate this.
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Override Portraits during a full conversation

Post by Alatriste »

It works like a charm. :)
I'd suggest adding also to the list of commands "SetPanel" for the same purpose. :)


Edit: I think found a bug. :(

When I have a 2nd branch in the dialogue using Menu Text and Dialogue, the response panel doesn't show up with the options. It gets stuck because there is not Continue button. However, if I connect it (to debug it) to the Start node, then it works fine.
Attachments
Inspector4.jpg
Inspector4.jpg (228.83 KiB) Viewed 887 times
User avatar
Tony Li
Posts: 21079
Joined: Thu Jul 18, 2013 1:27 pm

Re: Override Portraits during a full conversation

Post by Tony Li »

Alatriste wrote: Sun Jun 24, 2018 1:25 pmI'd suggest adding also to the list of commands "SetPanel" for the same purpose. :)
Good idea. I'll add it.
Alatriste wrote: Sun Jun 24, 2018 1:25 pmWhen I have a 2nd branch in the dialogue using Menu Text and Dialogue, the response panel doesn't show up with the options. It gets stuck because there is not Continue button. However, if I connect it (to debug it) to the Start node, then it works fine.
Would you please send me an example? I can't reproduce this.

Does the player's panel have a continue button?

What is the value of the Dialogue Manager's Input Settings > Always Force Response Menu checkbox?

If you don't want to use a continue button, you can set the node's Sequence to something like:

Code: Select all

Continue()@{{end}}
This will automatically continue after a duration based on the text length.
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Override Portraits during a full conversation

Post by Alatriste »

I'll take a look this evening when I come back home and I'll update the thread. :)
Post Reply