[Pogamut-list] senses.seeIncomingProjectile()

michal.bida pogamut-forum at diana.ms.mff.cuni.cz
Wed Jun 20 09:16:38 CEST 2012


Re: senses.seeIncomingProjectile()

Author: michal.bida

GameBots really are not exporting Shock rifle primary / Link gun secondary or lighting gun primary, but you can sort of infer this information when you see enemy player. Lets say you see enemy player, you check that his current weapon is lighting gun Player pl.getWeapon() and that he is currently shooting pl.getFiring() - 1 primary fire, 2 - secondary fire, 0 not firing. Then you can check his rotation pl.getRotation() and see where actually he is shooting. Rate of fire of weapons can be inferred from weaponry module - from ItemDescriptors for the weapons, e.g. this.weaponry.getWeaponDescriptor(ItemType.LIGHTNING_GUN).getPriBotRefireRate(); (but the weapon has to be available on current map your bot is in, otherwise this will return null). For basic orientation where are these non-projectile shots ending this should be enough.

Best,
Michal

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




More information about the Pogamut-list mailing list