# ResortObject

Objects
Position
4.9.1.0 GWE
bool
string resort_function Name of the function to be called for sorting order.
Resorts a single object in the internal object array. The sorting order is determined through a sorting function which should define the object position relative to other objects in the object array. If the first object is to be sorted before the second, the function should return a value less than zero. Otherwise, the function should return a value greater than or equal to zero.
Internal sorting is not done immediately but at the end of the frame in which the function was called.
protected func Collection2() { return(ResortObject("ResortProc"); }; protected func ResortProc(obj1, obj2) { return(obj1->GetMass()-obj2->GetMass());
Object script: if collected, the object resorts itself in the object array according to its mass (lighter objects in front).
SetObjectOrder
ResortObjects
Resort
Sven2
2003-06