SRL Archive - OSR Help

Sort ATPA from?


t4q

2013-04-05 22:14:20

Hey, is there a way to sort ATPA from MSCx,MSCy to outside?
I need to find ATPA which is closest to middle of RS main screen.

King

2013-04-05 22:15:34

From: t4q
Hey, is there a way to sort ATPA from MSCx,MSCy to outside?
I need to find ATPA which is closest to middle of RS main screen.


SortATPAFrom(ATPA Name, Point(MSCX, MSCY));

t4q

2013-04-06 03:40:43

thank you

t4q

2013-04-06 15:27:50

hmm… it doesn't work for me.. I need to find closest rock to me but it sometimes still runs to further one. I have smart_graphics on and it gives smaller numbers to rocks that are not the closest.
any ideas?

Haxz

2013-04-06 15:29:56

I think you should post your code here with simba tags so people can see what's wrong.

Sjoe

2013-04-06 15:30:28

Use SortATPASize(True, ATPA) first , this sorts the biggest sized tpa's first. (parameters might be wrong)
then use SortATPAFromMidPoint instead of SortATPAFrom

t4q

2013-04-06 16:25:50

This is what works, thanks
SortATPAFromMidPoint(RockATPA, point(MSCx,MSCy));