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.
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
It'll fix it don't worry ;)
Use SortATPAFromMidPoint :)
Also, SortATPAFrom just sorts each TPA from the point.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.