I'm following Your First Game to make my own project and try the same way to spawn enemy.
The enemy scene comes up on the screen once after the first "timeout" signal but after that the scene doesn't appear anymore.
Here is the stage's scripts:
extends Node2D
var f_as1 = preload("res://elements/formations/f_alpha_straight_toptobot_ch1.tscn")
var aship = preload("res://elements/elements/e_enemy_alpha.tscn")
export (PackedScene) var enemy
func _ready():
$Timer.start()
pass
func _on_Timer_timeout():
enemy = f_as1.instance()
add_child(enemy)
$Timer.start()
pass
Thanks in advance!