I have a code for spawning characters (enemies) at a Marker2D and I have it set to spawn at certain intervals throughout a round of the game. For some reason when I run the game, nothing shows up. I’m not sure if the timer is not working or if the spawn code has an issue or both. They also are set to work when the towers have HP and not when they have 0 so maybe that is causing an issue as well? I have everything inside a scroll container to allow scrolling on a mobile device but this should not be causing the issue that I know of.
What is your setup on the Timer node?
Try adding a couple more print() statements in your code, especially around the time calculations to see if the printed values are as you’d expect.
I have the timer on a 1 second wait. Then continually counting. And auto start. No script. I have a signal to a part of my code I forgot which part will give more detail tomorrow if you need it!
Make your current_time a class variable instead of the function variable (just put var current_time: float outside of the function, e.g. next to your spawn_timer declaration), then within your _process() function do current_time += delta, which will accumulate seconds over time. When you want to reset the timer, just do current_time = 0.0