This is less of a "How do I" and more of a "can I do this more optimized?"
I have a fairly simple event setup for dynamic z ordering using Y pos on a family of objects:
+ System: Every tick
----+ Zorder: Is visible
----+ System: For each Zorder
----+ System: Pick Zorder where Zorder.?Y > PlayerController.?Y
-----> Zorder: Move in front PlayerAnim
----+ System: Else
----+ Zorder: Is visible
----+ System: For each Zorder
----+ System: Pick Zorder where Zorder.?Y < PlayerController.?Y
-----> Zorder: Move behind PlayerAnim
This works well for my needs, and it handles it fairly well, i think. 67 sprites (all animated braziers) settles at around 5% CPU usage while walking up and down the layout constantly.
What I'm wondering is if anyone has done, or knows of something, more efficient CPU wise to do this? or is this about as clean as it can get?
quickedit. realized the pick should be before the loop. swapped them around, and its to about 4% now, which is nice, but main question still stands, thanks!