[Pogamut-list] Shoot Last Grenade

schrum2 pogamut-forum at artemis.ms.mff.cuni.cz
Thu Oct 30 22:35:32 CET 2008


Shoot Last Grenade
For some reason, it seems impossible for a bot to shoot its last grenade. I confirmed this with a simple bot using the following doLogic method:
--------------------------------------------------
public int x = 0;
protected void doLogic() {
        Player enemy = memory.getSeeEnemy();
        if(enemy != null){
            Triple loc = enemy.getLocation();
            if(loc != null){
                if(x % 2 == 0){
                    body.shootAlternate(enemy);
                }
                else{
                    body.stopShoot();
                }
                x++;
            }
        }
        log.info("Alt Ammo left = " + memory.getCurrentWeapon().currentAltAmmo);
    }
---------------------------------------------------

I can go stand in front of this bot, and it will fire the first three grenades, but then constantly fail to fire the third, even though the log messages confirm that it still has ammo left. Also, the log of outgoing messages doesn't change at all either, so something is going wrong on the server side.

I've noticed a similar problem with the alternate fire of the link gun, and maybe some others as well, though I'm not sure. Any idea why this is happening? Any way around it?

----

Reply Link: <http://artemis.ms.mff.cuni.cz/pogamut/tiki-view_forum_thread.php?forumId=3&comments_parentId=341#form>





More information about the Pogamut-list mailing list