Godot Version
4.6.1
Question
I’m implementing my version of the Mahjong game for learning purposes and setting up the initial data structures like a base Tile scene that implements a click and a tween to animate its movement. For some reason the only mouse buttons being detected are the mouse wheel up and down.
func _on_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
print(event.button_index)
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
print("clicked")
move_to_target()
if event.is_action_pressed("clicked"):
print("clicked")
I placed that print statement to make sure which event is being triggered and it only shows 4 and 5 (mouse wheel up and down). I even created an Action (“clicked”) in the project settings but also not being detected. I read somewhere that some other point in the game could be overriding the behavior for the clicks but I have no other signals connected in the entire game. Can you help me find where the issue is? the complete code is at my codeberg:
Thank you in advance
