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
komencanto wrote:GD has 3 loops: "Repeat x times", "While" and "For each object"
Where are they located? Can not find them anywhere in the Event Editor.
I found them! The top ribbon, sign "+" with small arrow under it.