So I had a node with area_2d enemies. When a player hits any of the enemies, the on_enemy_area_entered signal calls the game over function which adds the coins collected during that game instance to the global coin variable and saves it. Nice and dandy...except if the player hits both at the same time. When that happens, the signal calls the game_over function twice and therefore the player sees double of his real score in the main menu....Due to the type of game it is I cannot prevent the player from hitting two enemies at the same time
What can I do
game_over()have a boolean variable called something likehas_game_ended. At that top ofgame_over()checkhas_game_ended. If it'struereturn fromgame_over(). - hola