Enemy only instances once

Betting the snowgoons are spawning inside one another and causing physics problems, maybe flying away because they are constantly overlapping each other. You can check the “remote” tab in the scene tree while your game is running to see how th real scene tree develops as you test.


They don’t spawn somewhere randomly, only at spawn2’s global position. You probably have a warning along the lines of “Statment has no effect” on the line with array.shuffle, without parenthesis you are not using the function, just stating it. Add parenthesis, or use pick_random()

# with parenthesis the array is shuffled
array.shuffle()
# Using pick_random()
exist = [spawn1, spawn2].pick_random().global_position

Even with this there is a very high 50% chance they spawn in the same place again and cause collision overlap issues.


Make sure to paste scripts instead of screen shots

1 Like