Can someone help a newbie out? My game is crashing after a few shots because of this code. I have a timer node named "shot_timer" set to autostart and 1 second.
var times = [1,2,3]
var shots = 0
var cooldown = randrange(1,3)
while shots!= times[randi() % times.size()]:
var laser = scn_laser.instance()
shots += 1
I have been using yields with one shot timers, but was getting errors and was told to use timers instead. Thought they would be easier to use...
Thanks in advance.