I made a working ammo mod, but I would like to stop the firing animations when the gun is out of ammo. This is not for default guns, so I can modify the state script and such.
I just used %obj.setImageAmmo(0,0); in the script, and it calls the stateTransitionOnNoAmmo[1] state.