Closed RobertSzaszak closed 1 year ago
Managed to fix the error by modifying the Drag and Drop Script
func dragAndDrop(): #Drag and Drop $MouseArea.position = get_tree().root.get_mouse_position() if hoveredButton != null: if Input.is_action_just_pressed("Throw"): grabbedButton = hoveredButton lastClickedMousePos = get_tree().root.get_mouse_position() print(lastClickedMousePos) if lastClickedMousePos.distance_to(get_tree().root.get_mouse_position()) > 2: if Input.is_action_pressed("Throw") && hoveredButton != null: $MouseArea/InventoryButton.show() $MouseArea/InventoryButton.UpdateItem(grabbedButton.currentItem, 0) if Input.is_action_just_released("Throw"): if overTrash && hoveredButton != null: DeleteButton(grabbedButton) else: SwapButtons(grabbedButton, hoveredButton) $MouseArea/InventoryButton.hide() pass
This issue should be fixed
Managed to fix the error by modifying the Drag and Drop Script