extends Node2D @export var one_shot := true @export var hook_cg = "" var played := false @onready var area2d = %Area2D as Area2D # Called when the node enters the scene tree for the first time. func _ready() -> void: area2d.body_entered.connect(_entered) func _entered(_body): print("ambush body_entered!") if one_shot and played: queue_free() return # hook_cg if hook_cg != "": CgManager.play_cg(hook_cg) if one_shot: queue_free()