Hi! I made an enemy spawner, but for some reason the enemies are spawning outside ot the map?! I don’t know why the spawner is with Marker2d nodes, and there aren’t any outside of the map. Please help T0T
Here is how my code looks:
This is how the spawner looks:
And this is how it all looks on the map (the lighter purple spots are spawners):
I’m not 100% sure, but here’s something you can try to fix it: Replace this section of your code:
enemy.position = spawn.position level.add_child(enemy)
with the corrected version:
level.add_child(enemy) enemy.global_position = spawn.global_position
IT WORKED!!! Thank youuu!!!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.