Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ForgottenStar |
I am going along with a video on how to do a simple drag and drop in Godot but this error keeps showing up and this being my first time using Godot I have no clue how to solve it. the line I am not getting to work is line (8,1) thanks in advance
var dragMouse = false
func _ready():
pass
func _process(delta):
if(dragmouse):
set_position(get_viewport().get_mouse_position())
pass
func _on_Area2D_input_event(viewport, event, shape_idx):
if Input is InputEventMouseButton:
if event. is_pressed():
dragMouse = true
else:
Dragmouse = false
pass # Replace with function body.