Forum rules - please read before posting.

face expressions not resetting to default when skipping

I have a problem with skipping, which involves expression texture that shows lover face expressions. The blend shape of the upper face goes neutral after skipping, but characters still have the expression texture which was on when running the cut scene.
I'm using the ExpressionLipSync you provided me some time ago.
There is a OnSkipCutscene, but is that viable option?

Comments

  • OnSkipCutscene will trigger after a cutscene is skipped, but since multiple cutscene can be chained together it's not possible to use it to determine exactly which cutscene was involved.

    How exactly are expressions being changed within the cutscene? Share also the current state of your ExpressionLipSync script.

  • Actually it's not that script. The timeline speech with an expression doesn't get neutralized when skipping.

  • edited September 2021

    How are you setting the expressions in Timeline? Through speech, or the expression Timeline track?

  • Enable the calling of events in the Speech track, and test this script placed in the scene:

    using UnityEngine;
    using AC;
    
    public class ClearExpressionTest : MonoBehaviour
    {
    
        private void OnEnable () { EventManager.OnStopSpeech += OnStopSpeech; }
        private void OnDisable () { EventManager.OnStopSpeech -= OnStopSpeech; }
    
        private void OnStopSpeech (Char speakingCharacter)
        {
            if (speakingCharacter) speakingCharacter.ClearExpression ();
        }
    }
    

    Does that have any effect?

  • This works.

  • I had an impression that there was a way to set the expressions to neutral inside the AC settings, but couldn't find anything.

  • It doesn't work that way with Timeline, as skipping a Timeline isn't the same process as skipping an ActionList. The latter will process the effects of all Actions at once, but Timeline can't do that.

    Needs depending, the best way to update the state of your character after a Timeline has been completed is actually to rely on the OnCharacterExitTimeline event, as this is called only for characters that were involved in a particular timeline:

    using UnityEngine;
    using AC;
    
    public class ClearExpressionTest : MonoBehaviour
    {
    
        private void OnEnable () { EventManager.OnCharacterExitTimeline += OnCharacterExitTimeline; }
        private void OnDisable () { EventManager.OnCharacterExitTimeline -= OnCharacterExitTimeline; }
    
        private void OnStopSpeech (character, PlayableDirector director, int trackIndex)
        {
            character.ClearExpression ();
        }
    }
    
  • BTW Are you going to attach that to some future versions of AC? Or do I just leave this there?

  • edited September 2021

    It's most appropriate as a custom script IMO - though it'd be a good candidate for the AC wiki.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.