enique
Member
Using the code below I populate the room with an object, but I'm also trying to dynamically change the image_index of the object that gets placed down. For example the first object gets placed as image_index 1, then the next object that gets placed would be image_index 2, etc.
I've also tried a few other variations of this with no luck. Maybe I need to some how identify each instance of that object. The code you see just places all instances as image_index 2. Any assistance would be appreciated. Thank you.
EDIT: Btw, IDE v2.3.3.574 and Runtime v2.3.3.437
GML:
for (var i = 0; i < room_width div TILE_SIZE; i++)
{
for (var j = 0; j < room_height div TILE_SIZE; j++)
{
instance_create_layer(i * TILE_SIZE, j * TILE_SIZE, "Walls_Instances", obj_block)
obj_block.image_index += 1;
}
}
EDIT: Btw, IDE v2.3.3.574 and Runtime v2.3.3.437