[Solved]For-Next - where to find, how to use

How to repeat creation of the object several times? For example, how to create a pattern of hexagons in a shape of honeycombs and be able to refer to each hexagon? Where are iteration operators like for-next and how to use them?

GD has 3 loops: “Repeat x times”, “While” and “For each object”
In the loop, each time you create an object, it becomes the reference object, and every action in this event and sub-events will be executed in this object, for example (from an old post):

And you get:

Note: - In this example you can use Repeat 25 times instead the While.
- I set the object color and position to emphasize the created object is the reference one.
- Set the initial variables value is not necessary , GD set it = 0 automatically, and you can change it in the editor.

In the example I change the color and position, but you could set a variable (“ID”) different in each one. Then, in any event, you can add the condition “Variable ID of Object = 3” to work with the object that has Variable “ID” = 3 :slight_smile:

Where are they located? Can not find them anywhere in the Event Editor. :frowning:

I found them! :slight_smile: The top ribbon, sign “+” with small arrow under it.
screen1.png