Taylor1984 14 Posted March 25, 2018 Hi! How can I check when a mortar is out of ammo? _count = _mortar ammo "sh_82mm_amos" ? (_count == 0) : blablablaa doesnt seem to work Thanks Share this post Link to post Share on other sites
Floof 57 Posted March 26, 2018 if(count magazines _mortar == 0)then{hint "yep"}; It counts flares & smokes too. 1 Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted March 26, 2018 6 hours ago, Taylor1984 said: Hi! How can I check when a mortar is out of ammo? _count = _mortar ammo "sh_82mm_amos" ? (_count == 0) : blablablaa doesnt seem to work Thanks You can use @Floofs check, or this if you only want to take harmful ammo that can do damage into account: _mortar = YourMortar; _hasHarmfulAmmo = count (magazines _mortar select { _ammo = getText (configfile >> "CfgMagazines" >> _x >> "ammo"); _hit = getNumber (configfile >> "CfgAmmo" >> _ammo >> "hit"); _hit > 0 }) > 0; systemchat format ["Mortar has harmful ammo: %1",_hasHarmfulAmmo]; _hasHarmfulAmmo returns true if it has harmful ammo and false if not. Cheers 2 Share this post Link to post Share on other sites