I’am new in Gdevelop and I’m wondering how can I do fill my layer with many instances of the same game object. For example by adding a action in the beginning event.
In more details : I want to fill my layer with rows and columns of tiles (one tile has a size of 9px per 9px).
Hi and welcome
You should put a repeat event inside a repeat event.
One repeat takes care of lines, the other takes care of columns.
You will need to use variables to tell where the objects should be placed (and reset at the end of a line/column).
And since you’re new: Note that if the objects/floor is only visual, you shouldn’t bother with that. Use the tiled object.
Thank you Gruk.
Repeat event was the key I needed
But I have a issue : the repeat event continues the loop even if my number of times is reached (I put only 2 actions : create object and increase variable)
Do I have to put something at the end of the repeat event to stop the loop?
The events are repeated 60 times per second unless instructed otherwise.
You may place your repeat loops inside a parent event with the condition “Trigger once” or “At the beginning of the scene”.