Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Erythrochroism |
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
$Label.text=(S1a)
if scene== 2:
S2a = S2f% Stats.Name
$Label.text=(S2a)
if scene== 3:
$Label.text=(S3a)
In my main scene node:
func _on_UI_Introduce():
$AnimationOg.play("intro")
$AnimationOg/Label.show()
$AnimationOg.dialogue(1)
yield(get_tree().create_timer(2.0), "timeout")
$AnimationOg.stop(false)
$UI/LineEdit.show()
func _on_UI_LineDone():
$AnimationOg.dialogue(1)
$AnimationOg.play()
yield(get_tree().create_timer(3.0), "timeout")
print ("3")
$AnimationOg.dialogue(2)
yield(get_tree().create_timer(2.0), "timeout")
$AnimationOg.dialogue(3)
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.
I apologize if I haven’t formatted the right way, I’m quite new to this.