My problem is really simple, but I can't wrap my head around it. What I'm trying to do is to play an animation, and then switch scenes. Here's the code that I want to improve:
extends Control
onready var animplayer = get_node("../../AnimationPlayer")
func _input_event(ev):
if (ev.type==InputEvent.MOUSE_BUTTON and ev.button_index==BUTTON_LEFT and ev.pressed):
animplayer.play("AnimationPlayer")
get_node("/root/globals").setScene("res://Scenes/levelselect.scn")
func _ready():
pass
I couldn't find a solution to my problem, so I came here. Thanks in advance!