When I spawn an enemy it isnt showing up

Godot Version
4.3

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!

If your Timer is set to 1 second, then this line of code

var current_time = timer.time_left

means your current_time will never be greater than 1, so your spawn timers will never be reached.

I don’t think you even need the Timer node here honestly, I would just count the time from delta.

Will try this tomorrow! I’ll let you know if it works or if I get stumped

If I was to get rid of the timer how would I change my code to just count the time from when the round starts? Sorry I’m very new to all of this

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