[Pogamut-list] List With All NavPoints of The Map
cazub
pogamut-forum at artemis.ms.mff.cuni.cz
Tue Sep 9 00:36:27 CEST 2008
Re: List With All NavPoints of The Map
yah "this.memory.knownNavPoints();" works for me, i think it returns an ArrayList but that always includes playerstarts, weapons and all that,
so i guess you'd have to parse the unreal id.
NavPoints all say "pathnode" and then the number in the unreal id. Weapons will say like "InventorySpot" then a number. Theres also player starts and JumpSpots
So if my map is DM-Albatross i'd do something like
//init an arraylist with all navpoints
ArrayList myAllNavs = this.memory.knownNavPoints();
// init new arraylist to hold pathnode only navpoints
ArrayList justNavPoints = new ArrayList();
int size = myAllNavs.size();
String tmpStr = "";
//now cycle through all navpoints and if they contain the phrase //"PathNode"
// add that navpoint to my justNavPoints list.
for(int i = 0; i < size; i++){
tmpStr = myAllNavs.get(i).getUnrealID();
if(tmpStr.contains("PathNode")){
justNavPoints.add(myAllNavs.get(i));
}
}
might have to write your own "contains" or compare function to parse the UnrealID string. Not too hard to do though because the format for the message is always . , an example would be
DM-Albatros.PathNode35 or
DM-Albatros.InventorySpot4 or
DM-Albatros.PlayerStart1
anybody got a better idea? I hope so cuz this one works but its slow :P
----
Reply Link: <https://artemis.ms.mff.cuni.cz/pogamut/tiki-view_forum_thread.php?forumId=6&comments_reply_threadId=223&comments_parentId=78&post_reply=1#form>
More information about the Pogamut-list
mailing list