uMMORPG Local Chat To Bark UIs

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

uMMORPG Local Chat To Bark UIs

Post by Tony Li »

These are steps for sending uMMORPG local chat to bark UIs.

It requires a small change to a uMMORPG script, so it won't be in the Dialogue System addon, but the steps are pretty easy:

1. Add a bark UI to your character prefabs. In my test, I added the Bubble Template Standard Bark UI to the Warrior prefab. I increased the Main Panel's Pos Y to 512 to move it above the character's name tag, and removed the Bubble Panel's Animator because uMMORPG didn't like having it in the character's hierarchy.

2. Edit Chat.cs. Add this method:

Code: Select all

void Bark(string sender, string message)
{
    var barker = GameObject.Find(sender);
    if (barker != null) PixelCrushers.DialogueSystem.DialogueManager.BarkString(message, barker.transform);
}
At the end of the CmdMsgLocal() method, add this line:

Code: Select all

Bark(name, message);
At the end of the TargetMsgLocal() method, add this line:

Code: Select all

Bark(sender, message);
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: uMMORPG Local Chat To Bark UIs

Post by Tony Li »

Clarification on how to add Bark(name, message):

Code: Select all

    // networking //////////////////////////////////////////////////////////////
    [Command]
    void CmdMsgLocal(string message)
    {
        // ...(existing code here)...

        Bark(name, message); //<-- Add this line.
    }
Post Reply