#Use function of object
2 messages · Page 1 of 1 (latest)
const MAX_CHOPS = 5
var chops = 0
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func use():
print("test")
chops += 1
if chops >= MAX_CHOPS:
queue_free()