L
Liam_Ihasz
Guest
I have an object which I have placed 10 of in a room, in a line going left to right. I need to be able to number each object (1 - 10) going from left to right and then store that in a variable (ObjId). I am not 100% sure how to do this, and I would really appreciate some help.
I tried with a for loop,
var i;
for(i = 0; i < instance_number(obj_block); i += 1)
{
blocks = instance_find(obj_block,i);
}
but the instance_find function just arbitrarily chooses an object, so the array is in a random order. I need it to be biased off of the instances x coordinate maybe? Any Ideas would be greatly appreciated. Thank you for you time.
I tried with a for loop,
var i;
for(i = 0; i < instance_number(obj_block); i += 1)
{
blocks = instance_find(obj_block,i);
}
but the instance_find function just arbitrarily chooses an object, so the array is in a random order. I need it to be biased off of the instances x coordinate maybe? Any Ideas would be greatly appreciated. Thank you for you time.