0 votes

When the player dies, a colorRect appears that says game over, or that's what's supposed to happen but nothing does. I touch the enemy and it doesn't happen.

func _on_enemy_area_entered(area):
dead = true
if dead:
    get_node("GAME OVER").play("._game_over_.")
    yield(get_node("GAME OVER"), "animation_finished")
in Engine by (306 points)

Are you getting any errors or warnings? Have you made sure the callback is properly connected (print something or place a breakpoint at the beginning of the function)?

I think it could possibly be because the enemy moves via an animation player node

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.