I have a scene that contains multiple enemies. I call it enemyfactory.
enemyfactory node [script to duplicate enemy node below and return it]
enemy1node [enemy1control script]
enemy2node [enemy1control script]
This works great, I can call enemyfactory to spawn a new enemy.
I do the same for bullets and other things there are many of.
But the problem I'm having is that when the enemyfactory scene is loaded in via preload in global.gd singleton, the enemy1node, enemy2node, are instanced initially.
Here's the call in global.gd: enemyfactory = preload("res://enemies/enemyFactory.tscn")
I tried load and preload.
I don't want this behavior to happen. Is there a way to prevent it?
I want to load a tscn into a variable and NOT instance and of its contents right away. Is this possible?