[Pogamut-list] Adding weapons and ammunition

frank_fjs pogamut-forum at diana.ms.mff.cuni.cz
Wed May 12 21:01:20 CEST 2010


Adding weapons and ammunition

Author: frank_fjs

Hi,

I'm using Pogamut 3.0.9 and I'm trying to add some weapons and ammo for test my bots.

I read the javadoc and I use addInventory method in different methods (botSpawned and logic) but it don't work. I think is my code problem... 
        
-botSpawned (I want my bot start with some weapons):
getAct().act(new AddInventory().setType(ItemType.ROCKET_LAUNCHER.toString()));

-logic (I want some times to reload my weapon)
Weapon armaWeapon = this.weaponry.getCurrentWeapon();
WeaponDescriptor armaWeaponDescriptor = armaWeapon.getDescriptor();
ItemType municionItemType = armaWeaponDescriptor.getPriAmmoItemType();
ItemDescriptor municionItemDescriptor = this.descriptors.getDescriptor(municionItemType);
getAct().act(new AddInventory().setType(armaWeapon.getDescriptor().getInventoryType()));
getAct().act(new AddInventory().setType(municionItemType.toString()));                         

How must I do that?

I read in javadoc too that I must config the botAPI.ini file with bAllowCheats = True, but I'm not sure doing that well. I didn't find botAPI.ini file, there are a BotAPI folder with make.ini file. Just now I found GameBot2004.ini file, this file have bAllowCheats = True. May you confirm me what file is it?

Thanks

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





More information about the Pogamut-list mailing list