Walk Animation Still Plays During Conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
BWLGeorge
Posts: 41
Joined: Sun Jun 19, 2022 10:10 pm

Walk Animation Still Plays During Conversation

Post 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
User avatar
Tony Li
Posts: 22165
Joined: Thu Jul 18, 2013 1:27 pm

Re: Walk Animation Still Plays During Conversation

Post 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.
BWLGeorge
Posts: 41
Joined: Sun Jun 19, 2022 10:10 pm

Re: Walk Animation Still Plays During Conversation

Post 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)
User avatar
Tony Li
Posts: 22165
Joined: Thu Jul 18, 2013 1:27 pm

Re: Walk Animation Still Plays During Conversation

Post 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.
Post Reply