Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Kyle J144 |
Hey,
I am currently using godot version 3.1 and I am wonder how to get my dialogue cutscene to start after the animation as finished player. BTW I followed the following tutorial for the dialogue:
My code is:
extends Sprite
# Get a reference to the AnimationPlayer, which is a child of the camera.
onready var anim = $AnimationPlayer
func _ready( ):
# Connects the AnimationPlayer with the signal "animation_finished" to the camera
('self' here)
anim.connect("animation_finished", self, "_on_AnimationPlayer_animation_finished")
func _on_AnimationPlayer_animation_finished():
if anim == "prison-guard":
get_tree().change_scene("res://scenes/interface/gui/DialogueBox.tscn")
Any help appreciated and thanks in advance