Hey Tony,
Is there a script method to cancel all active barks? I tried using BarkGroupManager.instance.CancelAllBarks() but doesn't seem to work.
Also was wondering if there's a way to trigger and randomize barks via script as well?
Thank you!
Cancel and Randomize barks via script
Re: Cancel and Randomize barks via script
Hi,
To cancel all barks, add BarkGroupMember components to your barking characters. Then BarkGroupManager.instance.CancelAllBarks() will tell all BarkGroupMembers to cancel any active barks.
To trigger randomized barks in C#, use DialogueManager.Bark() to DialogueManager.BarkString(). If your conversation only has two dialogue entries to randomize from, Dialogue System version 2.2.50 will have a fix that randomly chooses between the two. (Currently it always uses the first entry if there are only two.)
To cancel all barks, add BarkGroupMember components to your barking characters. Then BarkGroupManager.instance.CancelAllBarks() will tell all BarkGroupMembers to cancel any active barks.
To trigger randomized barks in C#, use DialogueManager.Bark() to DialogueManager.BarkString(). If your conversation only has two dialogue entries to randomize from, Dialogue System version 2.2.50 will have a fix that randomly chooses between the two. (Currently it always uses the first entry if there are only two.)
Re: Cancel and Randomize barks via script
Thanks for the help Tony. Would there also be a way to sequentially trigger barks as well? Or i just need to ensure the previous bark doesn't repeat itself again.
Re: Cancel and Randomize barks via script
Hi,
Create a BarkHistory object and pass it along. Example:
Create a BarkHistory object and pass it along. Example:
Code: Select all
private BarkHistory barkHistory = new BarkHistory(BarkOrder.Sequential);
void BarkNextSequentialLineInOrder()
{
DialogueManager.Bark("My Bark Conversation", this.transform, barkHistory);
}
Re: Cancel and Randomize barks via script
Thanks it worked!
Re: Cancel and Randomize barks via script
Glad to help!