Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Dawoodywoody |
extends Area2D
export var road_side = “left”
var timer = “timed”
func _ready() → void:
position = Vector2(0, 0)
func if_donkey_entered(_body):
queue_free()
func _process(_delta: float) → void:
while timer == “timed”:
print(“test 2”)
if Input.is_action_pressed(“ui_select”):
if road_side == “left”:
position += Vector2(3, 0)
road_side = “right”
timer = “timing”
yield(get_tree().create_timer(0.5), “timeout”)
timer = “timed”
else: if road_side == “right”:
position += Vector2(-3, 0)
road_side = “left”
timer = “timing”
yield(get_tree().create_timer(0.5), “timeout”)
timer = “timed”
Yes, and? Your project may be crashing, but you haven’t told us what the error message is, nor how your scene is set up.
Ertain | 2022-10-24 12:23