extends Area2D # Variables var menu_visible = false var menu: Control # Función para inicializar el NPC func _ready(): # Conectar la señal de colisión connect("input_event", self, "_on_input_event") # Obtener el nodo del menú y ocultarlo al principio menu = $Menu menu.hide() # Función para manejar eventos de entrada (clic) func _on_input_event(viewport, event, shape_idx): if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT: if event.pressed: var mouse_position = get_global_mouse_position() if is_point_in_node(get_global_mouse_position(),self): # El jugador hizo clic en el NPC toggle_menu() event.handled = true # Función para mostrar u ocultar el menú func toggle_menu(): if menu_visible: menu_visible = false menu.hide() else: menu_visible = true menu.show() errors: ine 10:Invalid argument for "connect()" function: argument 2 should be "Callable" but is "res://Scripts/Lumberjack.gd". Line 10:Cannot pass a value of type "String" as "int". Line 10:Invalid argument for "connect()" function: argument 3 should be "int" but is "String". Line 21:Function "is_point_in_node()" not found in base self.