Page 1 of 1

How to trigger Bark using Visual Scripting?

Posted: Fri Jul 11, 2025 4:59 pm
by ZBD
Hi! I've been pulling my hair trying to make a character bark using Visual Scripting.

I have a conversation with four barks. I want to have this character emit one of the four lines at the end of this subgraph.
Image

Inpsector for the character that emits dialogue.
Image

The current visual script subgraph containing the bark nodes that are not working.
Image


Here is what the speech bubble looks like when using the Bark on Idle component.
Image
Right now, the speech bubbles do not appear.

Currently using Unity 6 and the latest Visual Scripting.

Anything helps, thanks!

Re: How to trigger Bark using Visual Scripting?

Posted: Fri Jul 11, 2025 5:29 pm
by Tony Li
Hi,

Here are two ways:

1. Set up a Dialogue System Trigger and invoke its OnUse(Transform) method. In the screenshot below, I put a Dialogue System Trigger on the visual script machine's GameObject and added a bark UI prefab as a child. I set up the Dialogue System Trigger's Actions to bark.

barkVisualScriptingDialogueSystemTrigger.png
barkVisualScriptingDialogueSystemTrigger.png (11.2 KiB) Viewed 63 times

2. Or get a reference to the Dialogue Manager's Dialogue System Controller component and call its Bark method. In the example below, I added an "NPC" named "Capsule", added a bark UI prefab as a child, and set up the script machine to call the DialogueSystemController's Bark() method.

barkVisualScripting.png
barkVisualScripting.png (33.29 KiB) Viewed 63 times

Re: How to trigger Bark using Visual Scripting?

Posted: Sat Jul 12, 2025 11:42 am
by ZBD
First option solved it! Thanks!


It would be even more helpful in the future if I could find more documentation on accessing these functions through Script Graph.

Re: How to trigger Bark using Visual Scripting?

Posted: Sat Jul 12, 2025 2:02 pm
by Tony Li
I don't know if it's helpful to you, but the full API is available here: https://pixelcrushers.com/dialogue_syst ... al2x/html/

Visual Scripting just provides a node-based wrapper around API calls.