Hello,
I have had little luck here, but I will try again.
I have an array that i stash values to and if there is nothing to stash the index stays an empty string.I draw this to the screen using a for loop (see below). But when it is drawing to the screen it is not drawing in order even though the array is in the right order of parts.
example input array: ["","","",[1,22,375,"TR375 Blk : "],"","",[ 1.50,22,409,"BR100- Blk : " ]]
(draw_part total is basically draw_text_color at a set color of green and alpha of 1 )
I had a nested for loop that worked but that impacted performance. Any ideas of why it isn't working as I anticipated?
Thanks in advance for any help!
I have had little luck here, but I will try again.
I have an array that i stash values to and if there is nothing to stash the index stays an empty string.I draw this to the screen using a for loop (see below). But when it is drawing to the screen it is not drawing in order even though the array is in the right order of parts.
example input array: ["","","",[1,22,375,"TR375 Blk : "],"","",[ 1.50,22,409,"BR100- Blk : " ]]
GML:
for (var i = 0; i < array_length(index_array); i++){
if index_array[i] != ""{
draw_part_total(index_array[i,0],index_array[i,1],index_array[i,2],index_array[i,3]);
}
}
I had a nested for loop that worked but that impacted performance. Any ideas of why it isn't working as I anticipated?
Thanks in advance for any help!
Last edited: