#Button won't open new scene

7 messages · Page 1 of 1 (latest)

stark hemlock
#

When I exit the menu, and play the tutorial mode go back to the main menu I can't press the button as seen in the video. This bug happends when I added the transition to add more effect

#

Here is the code for the transition

#

extends CanvasLayer

signal on_transition_finished

@onready var color_rect = $ColorRect
@onready var animation_player = $AnimationPlayer

func _ready():
color_rect.visible = false
animation_player.animation_finished.connect(_on_animation_finished)

func _on_animation_finished(anim_name):
if anim_name == "fade_to_black":
on_transition_finished.emit()
animation_player.play("fade_to_normal")
elif anim_name == "fade_to_normal":
color_rect.visible = true

func transition():
color_rect.visible = true
animation_player.play("fade_to_black")

#

as well the button

#

func _on_texture_button_pressed():
TransitionScreen.transition()
await TransitionScreen.on_transition_finished
get_tree().change_scene_to_file("res://scene/loading.tscn")

high lava
#

@stark hemlock If I understand your structure, color_rect.visible should = false instead of true when "fade_to_normal" finishes should it not?

stark hemlock