Thread: Y-Order
View Single Post
  #30  
Old 08-30-2002, 07:02 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Com013
And how are the non-order imgs to be sorted when they are mixed in a level with normal imgs?
You'd have to create a new layer for non-order imgs, which would conflict with existing scripts since you'd have to put it somewhere between layer 0 and 4.
Maybe you could use layer 3, since it is to be used with light effects, and they don't often overlap, so they don't need to be sorted. But then you couldn't have the day/night effects work on your images.
Here's a different idea: Negate the layer index to remove y-order sorting. So changeimgvis i,-2; is like layer 2 but without y-order sorting.

Quote:
However, the floating point layer idea is better...and don't argue about the time it takes to sort the images...insertion sort is quite fast (dunno if it is used), because you'd only have to sort one image in the (ordered) list of images, when it is changed.
Insertion sort is horribly slow when using any large amount of elements.
__________________
Reply With Quote