(sorry for bad english, using google translator)
I made a signal in my player's scene script that tells the map that its life reached 0, so it can queue free the Player and call the game over scene.
Player script example:
signal is_dead
func _on_dano_body_entered(body):
life -= 1
if life <= 0:
emit_signal("is_dead")
Map script:
onready var game_over = preload("res://GameOver.tscn")
func _on_Player_is_dead():
var fim = game_over.instance()
$Player.queue_free()
add_child(fim)
On the first map it works perfectly, but on the second one apparently the signal is not being emitted, he's lifes reach 0 but nothing happens (the second map uses the same script as the first).
Thanks for read.