looping through a type backwards?

Blitz3D Forums/Blitz3D Programming/looping through a type backwards?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Yea, that would work fine.

I guess what I'm really asking though, is if there is a way to not have to loop through twice? Once to check for dragging, and once to draw the images in the right order, since I need to draw them from back to front, yet check them from front to back.

The only thing I've thought of is making an array of types that I can sort through like (pseudocode):

for loop = i to count
check if dragging object(count-i)
draw image object(i)
next

but that is not very good since the number of objects will be changing a lot.

or is looping through twice simply the way to do it?