Page 1 of 1

Walk Animation Still Plays During Conversation

Posted: Wed Nov 09, 2022 8:45 pm
by BWLGeorge
I return once again with yet another Corgi Engine integration question

I've been trying to use the integration methods suggested in the Pixelcrushers documentation to get walking animations to stop when conversations are started, but I'm having an issue wherein, for some reason, no matter what sequence or code I'll call from the player character's dialogue system trigger, the character seems to be hard locked into the walking state, and any attempt to set the speed to 0 or change the walking bool to false instantly resets itself and the character goes right back to the walk animation (should note that, while the character does stop horizontally moving when conversation starts, their speed is at a constant "1" in the animator).

Any possible things that might be causing this, or any information I can give to help diagnose this?

Edit: Should add for some more clarity, the issue happens specifically when starting a conversation while walking (either by an automatic convo or a button activated convo). Running while starting a conversation, conversely, correctly sets the speed to zero and reverts to the idle state

Re: Walk Animation Still Plays During Conversation

Posted: Wed Nov 09, 2022 10:03 pm
by Tony Li
Hi,

Does this happen in the Dialogue System integration's Corgi Example scene?

The player prefab used in that scene only walks (i.e., only uses Character Horizontal Movement). It has a Dialogue System Trigger set to OnConversationStart that sets the player Animator's Speed parameter to 0. The example NPCs use Conversation Zones in which Player Is Actor is ticked, Can Move While Talking is UNticked, and Also Disable Movement Components is ticked. I also tested the same scene after adding a CharacterRun component to the player prefab.

Re: Walk Animation Still Plays During Conversation

Posted: Thu Nov 10, 2022 3:21 pm
by BWLGeorge
All of those settings are set and work. I'm in a bit of a hell of my own making because I'm working with a character that has multiple nestled horizontal move components that change based on what the character is doing and I think that's what's ultimately interfering here (setting the settings on the nestled move component works, but the parent one is still active). Just not quite sure why it still works for running but not walking, and why sending the sequence for both of the move components doesn't address the issue.

BUT in the complete odd chance anyone is trying to do what I'm trying to do, I jury-rigged a solution by having the walk transition not be the walk bool, but instead having a transition based on the XSpeed of the character (two different transitions to walking from idle on whether XSpeed is less than or greater than -0.1 and 0.1 respectively, and then a transition back to idle if XSpeed is less than and greater than 0.1 and -0.1 respectively)

Re: Walk Animation Still Plays During Conversation

Posted: Thu Nov 10, 2022 3:36 pm
by Tony Li
Got it. Another option for customized characters like this is to write a script that has OnConversationStart() and OnConversationEnd() methods, or use a Dialogue System Events component and hook it up to equivalent methods. In OnConversationStart(), do whatever you need to do to stop your character. In OnConversationEnd(), free up character movement again.