Page 1 of 1

@Message(Typed) using Text Animator

Posted: Mon Nov 30, 2020 1:28 pm
by Keiji
Hi Tony!

I just integrated Febucci's Text Animator into the Dialogue System UI I am using. So far it all worked perfectly, the effects and typewriter and click to skip all work. However, I noticed that the @Message(Typed) sequencer commands seem not to work anymore.

I may be doing something wrong. Can I not use those when I use the Text Animator Typewriter instead of the Unity one? Is there a workaround for this? I use AnimatorPlay(Idle)@Message(Typed); to trigger the idle state in my NPCs after they have talked their lines.

Wishing all the best,

Keiji

Re: @Message(Typed) using Text Animator

Posted: Mon Nov 30, 2020 4:48 pm
by Tony Li
Hi,

Since Text Animator does its own typewriting, it doesn't use the Dialogue System's typewriter effect that sends the "Typed" message.

Add this script to the same GameObject as the Text Animator Player:

TextAnimatorSendTyped.cs

Code: Select all

using UnityEngine;
using Febucci.UI;
using PixelCrushers.DialogueSystem;
[RequireComponent(typeof(TextAnimatorPlayer))]
public class TextAnimatorSendTyped : MonoBehaviour
{
    void Start()
    {
        GetComponent<TextAnimatorPlayer>().onTextShowed.AddListener(() => { Sequencer.Message("Typed"); });
    }
}

Re: @Message(Typed) using Text Animator

Posted: Mon Dec 14, 2020 9:56 am
by Keiji
Hey Tony! Sorry about the late reply! I redid the Dialogue UI and added your script as you suggested. Everything works perfectly again! Thanks a lot :D

Keiji

Re: @Message(Typed) using Text Animator

Posted: Mon Dec 14, 2020 10:55 am
by Tony Li
Great! Thanks for letting me know.