Hi, I've been having on and off issues with my no portrait dialogues maybe you can help me figure out if I'm doing things correctly. Basically I have 2 subtitle panels, one is for characters with portraits and the other is with the portrait panel disabled. I created NPC actors with portraits and an actor named no_portrait that is obviously meant to have the portrait panel disabled. I start a conversation using DialogueManager.StartConversation("conversation_name"). In the conversation the actor conversant is 'no_portrait', however sometimes it seems to use the regular subtitle with portrait. I guess this makes sense because there's no way for me to tell it that the no_portrait actor should use the no portrait subtitle without the portrait frame. Is there a nice way to do this? I do not want to use the Dialogue Actor component and a transform in the game to start conversations. I just need to trigger conversations in code.
Thank you for any help.
Actor with no portrait
Re: Actor with no portrait
The standard way is to use that Dialogue Actor component -- but since you don't want to do that, you can do it in code. Add a script with an OnConversationStart(Transform) method to the Dialogue Manager. Use the StandardDialogueUI.OverrideActorPanel() method to set the no_portrait actor's panel number. Example:
Code: Select all
void OnConversationStart(Transform actor)
{
var no_portrait_Actor = DialogueManager.masterDatabase.GetActor("no_portrait");
DialogueManager.standardDialogueUI.OverrideActorPanel(no_portrait_Actor, SubtitlePanelNumber.Panel2);
}
-
- Posts: 97
- Joined: Thu Aug 12, 2021 6:39 pm
Re: Actor with no portrait
Thanks I was able to get that part of it working using those event hooks however I have a new issue that's probably related to the fix. Now I'm noticing some strange behavior when I have an NPC conversation node followed by a No Portrait node - the NPC subtitle stays enabled behind the No Portrait subtitle and both remain open when I go back to an NPC node. Do I need to do something similar and tie into a conversation event to close out the subtitle? Any ideas as far as what to look for to debug this? Thank you.
Re: Actor with no portrait
Hi,
Do you want one subtitle panel to close when the other subtitle panel opens? If so, inspect their Standard UI Subtitle Panel components and set the Visibility dropdown to Until Superceded.
Do you want one subtitle panel to close when the other subtitle panel opens? If so, inspect their Standard UI Subtitle Panel components and set the Visibility dropdown to Until Superceded.
-
- Posts: 97
- Joined: Thu Aug 12, 2021 6:39 pm
Re: Actor with no portrait
Yes that works perfectly, thank you!