behaviour-tree-test/project/behaviours/check_weapon.gd
2026-03-16 23:33:00 +01:00

8 lines
226 B
GDScript

extends BehaviourAction
@export var match_type := ""
@onready var body := get_behaviour_tree().get_parent() as CharacterBody3D
func _enter() -> int:
return Success if body.get_current_weapon_type() == match_type else Fail