extends PathFollow3D
@export_category("EnemyMovementStats")
## How fast the enemy will move along the path
@export var speed : int = 5
## How much damage the enemy deals
@export var damage : int = 1
@onready var base = get_tree().get_first_node_in_group("base")
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
move(delta)
if progress_ratio == 1:
deal_damage()
set_process(false)
func move(delta : float) -> void:
progress += (speed * delta)
func deal_damage(dmg : int = 1):
base.take_damage(dmg)
die()
func die():
queue_free()
Changed the code to export_group and it works. Go figure!
Maybe worth posting a bug if you have time.
extends PathFollow3D
## Category <-- made this a Group instead
@export_group("EnemyMovementStats")
## How fast the enemy will move along the path
@export var speed : int = 5
## How much damage the enemy deals
@export var damage : int = 1