Page 1 of 1
NPC Subtitle Panel visible at all times
Posted: Wed Dec 03, 2014 10:51 am
by Boimans
Hi,
I have a conversation between my NPC and my PC. There is only one visible on screen at a time. They alternate. I want the NPC to stay visible at all times. I also want the PC pic to stay visible at all times. the PC texts can come and go. How do I do that?
Thanks
NPC Subtitle Panel visible at all times
Posted: Wed Dec 03, 2014 2:12 pm
by Tony Li
Hi,
I'm not sure I follow, so I'll give a few different answers.
If you want the NPC and PC gameplay models to stay visible:
1. Change the Dialogue Manager's Default Sequence to: Delay({{end}}
2. In the conversation's START node, set the Sequence to a Camera() sequencer command that positions the camera to include both models.
The Default Sequence will leave the camera untouched. The START node's Sequence will move the camera into position and leave it there for the rest of the conversation unless you use another Camera() sequencer command to move it elsewhere.
If your dialogue UI uses portrait images and you want the portrait images to stay onscreen at all times, make a subclass of the dialogue UI class that you're using. For example, say you're using the legacy Unity GUI system and you want the PC portrait image always onscreen. Assign this class instead of UnityDialogueUI:
using UnityEngine;
using PixelCrushers.DialogueSystem.UnityGUI;
public class AlwaysPCPortraitUnityDialogueUI : UnityDialogueUI {
public override void HideSubtitle(Subtitle subtitle) {
base.HideSubtitle(subtitle);
// After hiding, show the PC portrait image:
dialogue.pcSubtitle.panel.gameObject.SetActive(true);
dialogue.pcSubtitle.portraitImage.gameObject.SetActive(true);
}
}
The class above (save it as AlwaysPCPortraitUnityDialogueUI.cs) keeps the PC portrait image onscreen by overriding the HideSubtitle() method.
If you always want to have all subtitle panels (text, portrait names, portrait images) onscreen, make a subclass that overrides HideSubtitle() to prevent it from hiding anything:
using UnityEngine;
using PixelCrushers.DialogueSystem.UnityGUI;
public class NeverHideSubtitleUnityDialogueUI : UnityDialogueUI {
public override void HideSubtitle(Subtitle subtitle) {
// Do nothing. Don't hide.
}
}
If none of those are what you're looking for, please give me a few more details, preferably a mock-up screenshot. I'll be happy to suggest a solution.