Godot Version
4.3rc3
Question
i have a base class with %DeathAnimation
. Because Godot can only inherit scripts, not scenes, the children don’t automatically have %DeathAnimation
and that’s fine, some of the kids don’t need it.
Problem: How do i see if the thing exists?
This causes toooooons of errors:
# Node not found: %DeathAnimation
if null != %DeathAnimation:
death_animation = %DeathAnimation
# Also Node not found: %DeathAnimation
if is_instance_valid(%DeathAnimation):
death_animation = %DeathAnimation