I was originally running:
Code: Select all
if p.shooting_state.state ~= defines.shooting.not_shooting then
So what I've done so far, was loop through the players, grabbing their ammo inventory:
Code: Select all
local this_player_ammo = p.get_inventory(defines.inventory.character_ammo).get_contents()
Any help is always appreciated, thank you!
And if there's any better way to determine whether or not a player is actively shooting instead of this method, that's awesome too!!