I’m tanking an event driven dialogue system after using the excellent node based one you have made, but I would like to use all the awesome display logic that this system has. Currently I am using barks to display all my dialogue since it isn’t setup as conversations. But there are limitations to the bark system (maybe I’m just not good at using it) like being able to detect when a bark ends, canceling a bark halfway through being two that I have hit. Is there a better way to use the dialogue system to display text that isn’t coming from the dialogue system conversations? Or is there a way to safely cancel barks? I have a weird error where if I call StandardBarkUI.hide then the sometimes it causes the bark ui to hide after one frame on subsequent bark calls. Turning the bark ui game object inactive then active fixes it temporarily. I’m probably doing something very wrong somewhere though.
Any thoughts on approach? Override BarkUI like suggested in another form post (labeled Stop Bark)
Cheers
Using dialogue system for display only.
Re: Using dialogue system for display only.
Hi,
When a bark ends, the Dialogue System will send OnBarkEnd messages to the barker, listener, and Dialogue Manager.
Bark.Hide() is the right way to cancel a bark. If your bark UI is behaving strangely after manually calling Hide(), keep an eye on its Animator during play. Maybe the animator controller is getting into a strange state, or a trigger parameter is being set when it shouldn't.
The Bark Group Member component may also be useful. The enemies in DemoScene2 use it. When one member of a bark group barks, it cancels any other members' active barks.
When a bark ends, the Dialogue System will send OnBarkEnd messages to the barker, listener, and Dialogue Manager.
Bark.Hide() is the right way to cancel a bark. If your bark UI is behaving strangely after manually calling Hide(), keep an eye on its Animator during play. Maybe the animator controller is getting into a strange state, or a trigger parameter is being set when it shouldn't.
The Bark Group Member component may also be useful. The enemies in DemoScene2 use it. When one member of a bark group barks, it cancels any other members' active barks.
Re: Using dialogue system for display only.
Awesome I’ll take a look at the animator. Thanks for the help, you really do rock.
Re: Using dialogue system for display only.
Yeah the animator is stuck in the "hide" state. After bark finished normally, it goes into hide state, then when I call bark it goes into show start for the correct duration. But if I have called the Hide Bark Code below on the animator, then it gets stuck in the hide state. The BarkString call doesn't seem to transition it to the show state (It may in some brief state that I can't see, cause the speech bubble pops up for an instant) but just reruns the hide state.
Any ideas where to go now?
Show Bark code:
Hide Bark code:
Any ideas where to go now?
Show Bark code:
Code: Select all
var duration = baseDurationTime + (toFire.say.Length / 30f); // <-- Change to your characters per second value.
var sequence = "Delay(" + duration + ")";
DialogueManager.BarkString(toFire.say, characterGo.transform, null, sequence);
Hide Bark code:
Code: Select all
foreach (var barkUI in FindObjectsOfType<StandardBarkUI>())
{
if (barkUI.isPlaying) {
barkUI.Hide();
}
}
Re: Using dialogue system for display only.
Hi,
It sounds like the Hide trigger parameter is getting left in the set position for some reason. Please try this patch. It will reset the Hide trigger so that showing a new bark UI should work even if Hide was left set:
DS_BarkUIPatch_2021-06-02.unitypackage
It sounds like the Hide trigger parameter is getting left in the set position for some reason. Please try this patch. It will reset the Hide trigger so that showing a new bark UI should work even if Hide was left set:
DS_BarkUIPatch_2021-06-02.unitypackage
Re: Using dialogue system for display only.
You are a legend that worked (had to fix a compile error because it looks like it's from a different version, I'm on 2.1.16)
Reverted this line to include the UITools.CreateSprite call.
But it fixed my problem, thanks so much.
Reverted this line to include the UITools.CreateSprite call.
Code: Select all
portraitImage.sprite = UITools.CreateSprite(subtitle.speakerInfo.portrait);
Re: Using dialogue system for display only.
Great! Glad I could help.