I'm trying generate the above grid of objects dynamically (I want to be able to fade in each cell separately). The method I started using is
System | for 1 to 5 > create-object "hex_slot" on layer "slots", x: hex_slot.X + (loopindex*150), y: hex_slot.Y
This allows me to generate the first row. But each instance created has an opacity of 100, so I need to change the opacity of each instance to 0. Or say I want to set an instance variable value of the instance. Would I do this after each instance is created, or use a completely separate repeat loop that runs through all the created instances?
Also, how do I increment the Y position value to generate the next rows of cells? Typically to build a grid I would use a nested repeat loop, something like this (pseudo code):
X = 0, Y = 0
repeat with v = 0 to 5
repeat with h = 0 to 5
create object at X+(h*40), Y+(v*40)
How is this done in Construct, or is a different method needed?