![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | sumguy05 |
Below are a couple of the things I’ve tried to achieve this. I gave the gave over screen a control node with a menu that is defaulted to not being visible. How can I achieve this?
Method 1
#player
signal death_screen
if health >= 0:
queue_free()
emit_signal(death_screen)
#death
func _on_player_death_screen():
visible = true
pass
Can’t play game at all. It crashes.
Method 2
if health >= 0:
queue_free()
$death.visible = true
Game plays but crashes when player takes damage. Also has Node not found error in debugger.