Log in

View Full Version : SortATPAFrom.. Problem..



Brandon
02-28-2012, 08:08 PM
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
02-28-2012, 08:23 PM
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
02-28-2012, 08:28 PM
You need to use SortATPAFromFirstpoint why idk i just know that works.

Brandon
02-28-2012, 08:28 PM
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
02-28-2012, 08:29 PM
It'll fix it don't worry ;)

tls
02-28-2012, 08:52 PM
Use SortATPAFromMidPoint :)

tls
02-28-2012, 08:58 PM
Also, SortATPAFrom just sorts each TPA from the point.