diff --git a/addons/godot_state_charts/compound_state.gd b/addons/godot_state_charts/compound_state.gd index 3ea7d13..9f20f5e 100644 --- a/addons/godot_state_charts/compound_state.gd +++ b/addons/godot_state_charts/compound_state.gd @@ -56,6 +56,9 @@ func _handle_transition(transition: Transition, source: State) -> void: push_error("the target state: %s of transition from state: %s is not a state" % [str(transition.to), source.name]) return + if target.active: + return + # if direct child, just switch active state if target in get_children(): # deactivate current state