SRL Archive - Help

SortATPAFrom.. Problem..


Brandon

2012-02-28 15:08:16

lets say I found a ton of NPC's on screen using:

ATPA:= TPAToATPAEx(TPA, 50, 50);

//Then I do:

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

//Then:

MiddleATPAEx(ATPA[0], X, Y);

//Why is X, Y the furthest NPC from ME?!
//Doesn't seem to sort it from me at all..

Chris

2012-02-28 15:23:43

Shouldnt this:
 MiddleATPAEx(ATPA[0], X, Y); 
be:
 MiddleTPAEx(ATPA[0], X, Y); 


 [Error] (8:1): Unknown identifier 'MiddleATPAEx' at line 7
Compiling failed.

BraK

2012-02-28 15:28:51

You need to use SortATPAFromFirstpoint why idk i just know that works.

Brandon

2012-02-28 15:28:55

Oops.. that's just a mis-type in the OP.. I meant to put MiddleTPA(ATPA[0], X, Y).. It's still the same problem.

Edit: I'll try what u Suggested Brak

Edit2: Brak is right.. it fixed it =]
+1

BraK

2012-02-28 15:29:57

It'll fix it don't worry ;)

mormonman

2012-02-28 15:52:55

Use SortATPAFromMidPoint :)

mormonman

2012-02-28 15:58:38

Also, SortATPAFrom just sorts each TPA from the point.