Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

That’s easy. _process function is called every frame so If you reach health==0 your boss dies over and over. The easiest solution is making new variable alive, set it to true by default and then alter your _process function like:

var alive = true

func _process(delta):
  if health <= 0 and alive:
    # Here goes your die code
    $death_timer.start()
    $AnimationPlayer.play("death") 

    alive = false

Now die code triggers only once. Let me know if it works.