[Pogamut-list] How to make a simple double-dodge??????

aisa87 pogamut-forum at diana.ms.mff.cuni.cz
Wed Apr 13 14:08:25 CEST 2011


Re: How to make a simple double-dodge??????

Author: aisa87

It doesn't work!! I mean, I can get all the navpoints in the map, because I've counted them and it's like 207 something like that, but when I try to see if they are roaming spots I always get false.. It actually doesn't matter what you ask, it always says false. I've done the following in botSpawned:

        Map  existingNavPoints = world.getAll(NavPoint.class);
        for (NavPoint spot: existingNavPoints.values()) {
            if (spot.isRoamingSpot()) {
                roamingSpots.add(spot);
            }
        }

        if (roamingSpots.isEmpty()) {
            body.getCommunication().sendGlobalTextMessage("There are no roaming spots");
        }
        else {
            target = roamingSpots.get(next);
            next = (next + 1) % roamingSpots.size();
            IPathFuture  pathHandle = pathPlanner.computePath (info.getLocation(), target);
            pathExecutor.followPath(pathHandle);
        }

And then, the same when target is reached, assuming of course that next, starts on 0. 

It always says "There are no roaming spots". Even if I try "spot.isAIMarker()" or "spot.isSnipingSpot()" it always returns false. So in the end, roamingSpots is empty. Help!!

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=621&post_reply=1#form>





More information about the Pogamut-list mailing list