Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | tatubr |
I’m making a zombie game and I wanted to make like a “spawn”, which spawns the zombie every 10 seconds.
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | tatubr |
I’m making a zombie game and I wanted to make like a “spawn”, which spawns the zombie every 10 seconds.
Reply From: | Inces |
Create one Zombie scene in editor and save it. It will be saved as .tscn file. So lets call it Zombie.tscn
You can access it from code by
var zombie = preload("res://Zombie.tscn")
and create multiple clones of it by instance()
for example
for x in range(10):
var clone = zombie.instance()
add_child(clone)