Godot Version
4.4.stable
Question
I’m making a simple rhythm game with the notes at the top of the screen
when I press any key (this is how the rhythm game works so any input doesn’t matter)
I get all of the left side notes freed all at once rather than what I want which is what note is on the detector
the code for the notes is:
extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
position += Vector2(10, 0)
if $Area2D.get_overlapping_areas() and Input.is_anything_pressed():
self.queue_free()
and the detector is:
extends AnimatedSprite2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
if Input.is_anything_pressed():
$".".play("Press")
else:
$".".play("Idle")
could I have some help please?
