@tool
class_name StartTimer extends ActionLeaf
## Start the given timer.
## If `seconds > 0`, start the timer with that duration, otherwise use the default.

## Timer to start.
@export var timer: Timer

## Number of seconds to set the timer for. If <0, use the default.
@export var seconds := -1.0


func tick(_actor: Node, _blackboard: Blackboard) -> int:
	if seconds > 0:
		timer.start(seconds)
	else:
		timer.start()
	return SUCCESS
