- Edited
Hello, I'm completely new to Godot (but I'm experienced programmer). I wanted to do simple shooter with enemies spawned to different paths at runtime. I created spawner node with this method in it:
func spawn_enemy(path: Path2D):
var i = enemy.instance()
#get PathFollow2d and add enemy to it:
var pathfollow = PathFollow2D.new()
pathfollow.add_child(i)
path.add_child(pathfollow)
Now - 1. How to move this enemy along the pathFollow2d? 2. Should the movement code go to enemy script, spawner script, path2d script or somewhere else? 3. Do I have to add _process method to spawner for rendering purposes?
Thanks!