Two portraits management

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
AvivXR
Posts: 19
Joined: Wed Jun 19, 2024 4:17 pm

Two portraits management

Post by AvivXR »

<iframe src="" width="640" height="480" allow="autoplay"></iframe>

Hi,
I am trying to create a visual novel using the visual novel template.
I have two panels, one for the player and one for all the NPCs.
I have many NPCs but the player is only talking to one at a time, so there is no need for more panels

It is working but I have two annoying issues:
1. I wish to delete the player subtitle once the NPC starts to talk and vice versa (probably an idiotic question)
2. Sometimes I change a Conversant in the the middle of the conversation. But in the dialogue, the correct portrait will only show once the NPC starts talking. Is there a way I can manually pick \ show\ hide \ an actor on my NPC Panel?(hopefully without adding more panels)
Thanks!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two portraits management

Post by Tony Li »

Hi,

> 1. I wish to delete the player subtitle once the NPC starts to talk and vice versa

Assign the same Subtitle Text GameObject to both panels (PC and NPC).

> 2. Sometimes I change a Conversant in the the middle of the conversation. But in the dialogue, the correct portrait will only show once the NPC starts talking. Is there a way I can manually pick \ show\ hide \ an actor on my NPC Panel?(hopefully without adding more panels)

Add an empty dialogue entry node. Set the Actor dropdown to the new NPC, and set the Sequence to: Continue()@0
AvivXR
Posts: 19
Joined: Wed Jun 19, 2024 4:17 pm

Re: Two portraits management

Post by AvivXR »

Thank you!!!
However, the solution of using the same text panel for both characters might not do for me since each text panel is aligned differently.
I managed to pass it using the OnFocus and OnUnfocus events. (I setActive the text panel)

As for adding the empty dialogue it didn't seem to change anything. The old character is still showing until the new character has something to say. I can move that part of the conversation to a new conversation and it should solve the issue unless there is an easier way.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two portraits management

Post by Tony Li »

Yes, in that case use the SetPanel() sequencer command. You can do this in the same dialogue entry. You don't need an empty dialogue entry for it. For example, to change subtitle panel 0 to show the portrait of the actor named "Bob" after 1 second, set the dialogue entry's Sequence to:

Code: Select all

{{default}};
SetPanel(Bob, 0, immediate)@1
AvivXR
Posts: 19
Joined: Wed Jun 19, 2024 4:17 pm

Re: Two portraits management

Post by AvivXR »

mmm.... it still doesn't work for me.

I'll try to simplify.
In my Template under Dialogue Panels, I have two Subtitle panels.
Player Panel - for the player only
NPCs Panel - for the rest of the actors. (only one at a time)
Each panel has its own Portrait Image and a text panel.
It all works well until I change the avatar in the middle of a conversation.
the old portrait persists until the new NPC starts to talk. Even though in the conversation I change the actor and the conversant.

I simply wish to be able to control the npc that appears in the npc panel, and also be able to hide them on demand.
What am I missing? :(
Thanks for your patience..
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two portraits management

Post by Tony Li »

Hi,

The 'immediate' keyword should change the portrait immediately. For example, this sequencer command will change subtitle panel 0's portrait name and image to Bob's name and image at the 1-second mark:

Code: Select all

SetPanel(Bob, 0, immediate)@1
If that doesn't work, what Dialogue System version are you using? Can you back up your project, make sure the backup is good, and then update to the current version?
AvivXR
Posts: 19
Joined: Wed Jun 19, 2024 4:17 pm

Re: Two portraits management

Post by AvivXR »

Great...
I think I got it now.
For some strange reason it ignored one of the actor names (I had to change it in the DB), and also I had errors since I don't use the name labels for the portraits.

Is there also away to hide a certain panel - portrait and text?
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Two portraits management

Post by Tony Li »

Hi,

Yes, you can use the HidePortrait() sequencer command.
AvivXR
Posts: 19
Joined: Wed Jun 19, 2024 4:17 pm

Re: Two portraits management

Post by AvivXR »

Cool. Thanks!
Post Reply