The Illusion 1 Posted April 16, 2020 Hi Everyone! So, I finally got around to learning python (still not actually done that..) and I have made a mod: https://github.com/Arkhorse/IVM The issue is that I am trying to get the current ammo count, and then play events based on the count. I am unable to find where that info is at. The rest I can do. Also, if you know of ways to improve this, dont hesitate to mention it! Thanks 3 Quote Share this post Link to post Short link Share on other sites
The Illusion 1 #480869 Posted April 17, 2020 So many possibilities... But none are working... Latest attempt: if config.data['emptyShellsEnabled'] == True and config.TESTER == True: from helpers.CallbackDelayer import CallbackDelayer class IVM_SoundEvent(CallbackDelayer): def __init__(self, effectDesc): CallbackDelayer.__init__(self) self._desc = effectDesc self.sound = None return def __del__(self): if self._sound is not None: self._sound.stop() self._sound = None CallbackDelayer.destroy(self) return def start(self, shellCount, lastShell, reloadStart, shellReloadTime): if reloadStart: if shellCount == 0: SoundGroups_g_instance.playSound2D(config.data['emptyShellEvent']) print '[IVM] Player out of ammo!' elif shellCount == 5: SoundGroups_g_instance.playSound2D(config.data['almostOutEvent']) print '[IVM] Player is almost out of ammo!' else: pass time = shellReloadTime - self._desc.duration self.delayCallback(time, shellCount, BigWorld.time() + time) return def stop(self): if self._sound is not None: self._sound.stop() self._sound = None return else: pass Based this off of ReloadEffect in the game files... 2 Quote Share this post Link to post Short link Share on other sites
DKRUBEN 19 #495692 Posted January 15, 2021 from skeletons.gui.battle_session import IBattleSessionProvider from helpers import dependency def getState(): guiSessionProvider = dependency.descriptor(IBattleSessionProvider) guiSessionProvider.shared.ammo.getGunReloadingState().getTimeLeft() 1 Quote Share this post Link to post Short link Share on other sites
The Illusion 1 #495858 Posted January 20, 2021 On 1/15/2021 at 4:35 PM, DKRUBEN said: from skeletons.gui.battle_session import IBattleSessionProvider from helpers import dependency def getState(): guiSessionProvider = dependency.descriptor(IBattleSessionProvider) guiSessionProvider.shared.ammo.getGunReloadingState().getTimeLeft() thanks Quote Share this post Link to post Short link Share on other sites
spoter 1,402 #495872 Posted January 21, 2021 BigWorld.player().guiSessionProvider.shared.ammo.getGunReloadingState().getTimeLeft() чего вы там выдумываете? 1 Quote Share this post Link to post Short link Share on other sites