Changing Animation State with Dialogue Trigger Event

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DrewThomasArt
Posts: 60
Joined: Thu Mar 24, 2022 12:07 am

Changing Animation State with Dialogue Trigger Event

Post by DrewThomasArt »

I want players to be able to interact with usable game objects and have the animation state be affected.
For example, they press C and the chest will go from closed to open.
I made a dialogue event and set it to trigger an animation state on use, but I don't know how to write that in the script.
Any help is appreciated, thank you.
Screenshot (28).jpg
Screenshot (28).jpg (409.5 KiB) Viewed 358 times
User avatar
Tony Li
Posts: 21965
Joined: Thu Jul 18, 2013 1:27 pm

Re: Changing Animation State with Dialogue Trigger Event

Post by Tony Li »

Hi,

It looks like you're almost there. Set the State field to ChestOpen:

chestOpen.png
chestOpen.png (149.31 KiB) Viewed 356 times
DrewThomasArt
Posts: 60
Joined: Thu Mar 24, 2022 12:07 am

Re: Changing Animation State with Dialogue Trigger Event

Post by DrewThomasArt »

Tony Li wrote: Mon Oct 17, 2022 8:43 pm Hi,

It looks like you're almost there. Set the State field to ChestOpen:


chestOpen.png
Thank you. I tried that but you confirming that was right made me realize that I forgot to actually put the animation frames in the animator :I Thanks again
User avatar
Tony Li
Posts: 21965
Joined: Thu Jul 18, 2013 1:27 pm

Re: Changing Animation State with Dialogue Trigger Event

Post by Tony Li »

Glad to help!
Post Reply