I was wondering if there's a way to say "if double click: # do this" in gdscript. I'm aware of this page(https://docs.godotengine.org/en/stable/classes/class_inputeventmousebutton.html), but I'm still having trouble understanding how to implement it through code.

Basically I want my character to move faster if you double click the left mouse button on a position.

  • xyz replied to this.
  • NJL64

    func _input(e):
    	if e is InputEventMouseButton and e.button_index == MOUSE_BUTTON_LEFT and e.double_click:
    		print("DOUBLE CLICK")

    NJL64

    func _input(e):
    	if e is InputEventMouseButton and e.button_index == MOUSE_BUTTON_LEFT and e.double_click:
    		print("DOUBLE CLICK")