![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | DaanDev |
please help
queue_free does work but the var does not change when kinimaticbody2d entered
extends Area2D
var score = 0
func _on_Bug_body_entered(body):
score += 1
queue_free()
extends Label
func _process(delta):
self.text = str(Bug.score)
Try this:
extends Area2D
func onBugbodyentered(body):
body.score += 1
queue_free()
timothybrentwood | 2021-12-05 19:45