Just wanted to get some second opinions/tips for a bubble sort function I'm writing. I have ten Character object instances that I want to sort according to where they are along the X axis. Not sure I understand completely how C2 events work when it comes to object instances, but if I got it right I can't reference multiple instances of the same object directly within the same function call. So what I'm doing is run a couple of extra For loops to get to the Character instances I want to reference later, then plunk the values I need from them into local variables that I use for comparison further down the line.
But that makes for an awful lot of loops within a function that's set to run every tick. I'm worried. Will all this nested looping brutalize weaker computers? Am I doing it wrong/being stupid? Is there a better way? I'd really appreciate any tips or get some reassurance that it's alright