SRL Archive - OSR Help

Sorting ATPA Distance


Rhiot

2013-03-22 18:33:20

How can I sort ATPAs by their distance from the center of the minimap? Farthest point coming first.

-Thanks

E:
No help needed anymore!
A little looking around..can just use SortATPAFrom and then InvertATPA to sort from farthest first.

wthomas

2013-03-22 18:37:14

use this

SortATPAfromMidPoint(ATPA,inttopoint(fromX,fromY));
where fromX/Y is the center of the minimap.

ps. search the inbuilt fuctionlist :)

Element17

2013-03-22 18:41:53

SortATPAFromFirstPoint(ATPA, Point(MSCX,MSY1));