Cycle to create GameObject randomly in seconds (SOLVED)

Hi there. I want to create my GameObject randomly in seconds with infinity cycle. How I can do that in Defold? Script example please.

We have a timer module that can be made to repeatedly call a function:

timer.create(1, true, function(self, id)
    print("I will be run every second")
end)

You create game objects using the factory component:


3 Likes