![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | boquetipo |
Hi, I’m just trying to change to a new scene in a simple way with a signal, and I’m having an weird? issue:
Main scene:
Node2d > Button (with signal):
func _on_Button_pressed():
get_tree().change_scene("res://secondary.tscn")
Secondary scene:
Node2d:
func _ready():
print('ready board');
func _process(delta):
_read_input()
func _read_input():
if (Input.is_action_just_released("left_click")):
print('-----------------------');
When I click mouse left button in Main scene, everything works fine, and Secondary scene is presented on screen, but left_click released is read, so the code inside the if is executed. I would like to avoid this from happening.
Could anybody help me please? I don’t know what I’m doing wrong.
Code to blame: scenes_test.zip - Google Drive