Page 1 of 1

Changing Animation State with Dialogue Trigger Event

Posted: Mon Oct 17, 2022 6:26 pm
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 356 times

Re: Changing Animation State with Dialogue Trigger Event

Posted: Mon Oct 17, 2022 8:43 pm
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 354 times

Re: Changing Animation State with Dialogue Trigger Event

Posted: Mon Oct 17, 2022 9:01 pm
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

Re: Changing Animation State with Dialogue Trigger Event

Posted: Mon Oct 17, 2022 9:12 pm
by Tony Li
Glad to help!