Bark Tutorial

(Click Here For Video Version)

This tutorial demonstrates how to set up barks. Barks are one-off lines that typically appear above a character's head (although they can appear wherever you want) rather than playing in an interactive back-and-forth as with regular conversations. We'll set up a GameObject that barks at a randomized frequency.

Step 1. In a new scene, add the Dialogue Manager prefab. Create a new database and assign it to the Initial Database field.

Step 2. Create a conversation named "Barks" with three nodes linked directly from the START node:

The texts are:

NPC: Hello.
NPC: Nice weather, eh?
NPC: How about them sports?

Step 2. Add a capsule at (0, 0, 0).

Step 3. Add a Dialogue Actor component. Assign Plugins ► Pixel Crushers ► Dialogue System ► Prefabs ► Standard UI Prefabs ► Templates ► Bubble ► Bubble Template Standard Bark UI to the Dialogue Actor's Bark UI Settings → Bark UI, and set the Bark UI Offset to (0, 0, 0). The Dialogue Actor will instantiate this bark UI prefab at runtime. Your capsule's inspector should now look similar to this:

Step 4. Add a Bark On Idle component. Set the Conversation to Barks. The default values specify to play a random node, chosen from the nodes linked from START, every 5 to 10 seconds. Your capsule's inspector should now look similar to this:

Now play your scene. Every 5 to 10 seconds,

You can use conditions in bark conversations. For example, you could vary the barks based on the states of variables. For more about conversation conditions, see the Conversation Conditions Tutorial.

If you want to trigger barks through player interaction, see the Interaction Tutorial.


<< Tutorials