I cant seem to reference the timer, every attempt says its null
I want to make a spawner, that emits a signal every timeout and send waves left and a reference to the object created.
when the player pressed an action key it places a spawner creating a new object of spawner class
The main script will check if waves left is 0, and then call queue_free
problem is i cant seem to get the timer going other than the 1st instance, because im using the checkbox on the left to start autotimer. Subsequent placements do not start timer
you try to create the spawn by instantiating the class with “.new()” but if you want the children of the scene you have to load the scene and then instantiate it:
var spawner = load("path/to/spawner-scene").instantiate()
Brother, thank you so much This worked in creating new spawners.
So to clarify, I instantiate a new scene of the spawner in the place_spawner function and then when its job is done i call queue_free() on that specific instance of it by passing its object id.