Set Animator Bool from a Dialogue node

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Digital Adam
Posts: 13
Joined: Fri Nov 01, 2024 2:56 pm

Set Animator Bool from a Dialogue node

Post by Digital Adam »

I'd like to be able to control my NPCs animation via Dialogue Nodes. For example, when my NPC say's Hi, I would like a friendly wave to play. In my Animator I have a bool that if checked plays a wave animation. How do I add that to the Dialogue node?

Thanks!
User avatar
Tony Li
Posts: 22655
Joined: Thu Jul 18, 2013 1:27 pm

Re: Set Animator Bool from a Dialogue node

Post by Tony Li »

Hi,

In the dialogue entry node's Sequence field, use the AnimatorBool() sequencer command. More info: Cutscene Sequences. Example:

Code: Select all

{{default}};
AnimatorBool(wave)
Notes:

1. The {{default}} keyword also plays the Dialogue Manager's Default Sequence. See also: How To: Control the Duration of Subtitle Text

2. For a wave, you may want to use AnimatorTrigger() with a trigger parameter instead.
Digital Adam
Posts: 13
Joined: Fri Nov 01, 2024 2:56 pm

Re: Set Animator Bool from a Dialogue node

Post by Digital Adam »

Thank you.
User avatar
Tony Li
Posts: 22655
Joined: Thu Jul 18, 2013 1:27 pm

Re: Set Animator Bool from a Dialogue node

Post by Tony Li »

Glad to help!
Post Reply