Forum rules - please read before posting.

Expression freezing, then unblocking after next action

edited October 2021 in Technical Q&A

Hi, I'm having problems with 3D game tutorial, Brain is smiling until my next action, how can I set him to smile for about 2 seconds or something like that? The video of problem is below.

Adventure Creator version 1.73.5
Unity Version 2020.3.14f1.713 Personal

Thanks beforehand.

Comments

  • You can end the speech line's text with another expression token to reset him:

    [expression:none]
    

    If you want to automate this for all characters, you can hook a custom script into the OnStopSpeech custom event:

    using UnityEngine;
    using AC;
    
    public class ResetExpression : MonoBehaviour
    {
    
        private void OnEnable () { EventManager.OnStopSpeech += StopSpeech; }
        private void OnDisable () { EventManager.OnStopSpeech -= StopSpeech; }
    
        private void StopSpeech (AC.Char speaker)
        {
            if (speaker)
            {
                speaker.ClearExpression ();
            }
        }
    
    }
    
  • edited October 2021

    Thank you very much, it worked! But I also have a question on how to control the expression value, in the video in the actionlist at first you've created an object>blenshape parameter, but I could not understand how to use it to control the expression value on different dialogues, on what I need to link that parameter or what I need to do with it? Or maybe there is some text token that can change the expression value on different dialogues? Maybe some [expression:happy:value20] or something like that))

  • edited October 2021

    Expressions can't be assigned an intensity value: an expression is either active or not. The Object: Blendshape Action doesn't have this limitation, however.

    Another way to animate facial expressions, though, is to move your cutscene to Timeline and rely on an additive Animation track. Timeline isn't covered in the 3D tutorial, and both Timeline and its Animation track are a Unity feature. A video on AC's integration with Timeline, however, can be found here.

    The 3D Demo's opening and closing cutscenes are also built using Timeline.

  • edited October 2021

    Thanks.

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.