0 votes

I have an animation sequence where I'd like to begin the animation, have the player asked for some input and then have that input be part of the animation. This is the code I have.

In my animation node:

  func dialogue(scene):
    if scene==1:
        S1a = S1f % Stats.Name
    if scene== 2:
        S2a = S2f% Stats.Name
    if scene== 3:

In my main scene node:

func _on_UI_Introduce():
    yield(get_tree().create_timer(2.0), "timeout")

func _on_UI_LineDone():
    yield(get_tree().create_timer(3.0), "timeout")
    print ("3")
    yield(get_tree().create_timer(2.0), "timeout")

The text input and everything all works fine, but the animation ends up really weird and glitchy, for example, it will play the last line multiple times, flickering and switching between colors and alignments.

My animation tracks

I apologize if I haven't formatted the right way, I'm quite new to this.

in Engine by (51 points)

1 Answer

+1 vote
Best answer

I suggest that instead of using timers, add "Call Method Track" tracks in your animation. This will be more flexible as you can then move the call to the method later. You can still call the stop function with a reset parameter value set to false and then play later to resume the animation.

by (244 points)
selected by

That works much better, thank you.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.