Player animation (Mechanim) not changing to idle during conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
warlockoo1
Posts: 15
Joined: Thu Feb 02, 2017 2:47 am

Player animation (Mechanim) not changing to idle during conversation

Post by warlockoo1 »

Hello again,
So I am making project with dialogue manager with Action RPG Kit. Now problem arises when in conversation trigger, if player's animation state is running then it should change to idle if I use "Set Animator State on Dialogue" as I am using Mechanim system for animation. But its not working as if player is in running state then camera will stop but player will go on running.
I've attached screenshots for that component and animator.

Thanks
Attachments
Inspector.PNG
Inspector.PNG (35.23 KiB) Viewed 810 times
Animator.PNG
Animator.PNG (75.39 KiB) Viewed 810 times
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player animation (Mechanim) not changing to idle during conversation

Post by Tony Li »

Hi,

I'll check this out and reply back later today in case something changed recently in ARPG.

As a test, you could set the Script Execution Order of Set Animator State On Dialogue Event to 999. It may be that something else is setting the animator state on the same frame. This change should help ensure that the Set Animator State On Dialogue Event component has the last word on the animator state.
warlockoo1
Posts: 15
Joined: Thu Feb 02, 2017 2:47 am

Re: Player animation (Mechanim) not changing to idle during conversation

Post by warlockoo1 »

Ok sure I will test that. Thanks
warlockoo1
Posts: 15
Joined: Thu Feb 02, 2017 2:47 am

Re: Player animation (Mechanim) not changing to idle during conversation

Post by warlockoo1 »

OK I have set the Script Execution Order of Set Animator State On Dialogue Event to 999, but still its same. Might be something else, but thanks for looking.
Attachments
Capture.PNG
Capture.PNG (15.12 KiB) Viewed 805 times
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player animation (Mechanim) not changing to idle during conversation

Post by Tony Li »

Okay, thanks for trying that. I'll reply back with my findings later today.
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player animation (Mechanim) not changing to idle during conversation

Post by Tony Li »

Hi,

I had to update the Dialogue System's ARPG Support package a bit. There's a new script named StopPlayerMecanimOnConversation. You can add it manually or use the menu item Window > Dialogue System > Third Party > Action-RPG Starter Kit > Setup Player Prefab.

ARPG leaves the Mecanim parameters in their current state when PlayerMecanimAnimationC is disabled. This means that the animator will immediately transition back to running because the parameters are set that way. This new script just sets those parameters to an idle state at the beginning of the conversation. You also no longer need the Set Animator State On Dialogue Event component, although it doesn't hurt to leave it there.

You can download the updated ARPG Support package from here: Dialogue System Extras
warlockoo1
Posts: 15
Joined: Thu Feb 02, 2017 2:47 am

Re: Player animation (Mechanim) not changing to idle during conversation

Post by warlockoo1 »

Thank you so much for the great effort. It really worked :)
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player animation (Mechanim) not changing to idle during conversation

Post by Tony Li »

Happy to help!
Post Reply