If I am understanding correctly, you just need to track how many times _process
has been called, as _process
is called once per frame. To do something every frame, similar to a loop, you could try something like this (untested):
var loop_count = 0
var is_looping = true
var maximum_number_of_loops = 30
func _process(delta):
if (is_looping == true):
# do thing here!
print (“Loop Number: “, loop_count)
loop_count += 1
if (loop_count >= maximum_number_of_loops):
is_looping = false
So for a tile map, instead of #do thing here
, you could place a tile, and that should add a tile for every frame until all 30 tiles have been placed! (You will need to calculate the position of the tiles though, using loop_count
or something)