![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | System_Error |
Hi all. So very close to getting a game functioning the way I envisioned. Little problem, though…
I spawn in my enemies at one side of the screen, and they move to the opposite side. That part works. The first enemy that reaches the Player’s base is freed from the queue, and stops the enemies from spawning. That also works. But how do I apply queue_free() to the remaining enemies?
I think my Level.gd script would be necessary. This section is from the part that initiates “Game Over”
func _on_BaseArea_area_entered(area):
print("Collision!")
$Node/SpawnTimer.stop()
$Node/SurvivalTimer.stop()
$HUD.player_loss()
emit_signal('game_over')
$BaseArea/CollisionShape2D.disabled = true
get_tree().call_group("EyeWorms", "queue_free") # This is the new
# line.
System_Error | 2018-12-17 17:12