Spriterfight 10 Posted October 1, 2020 _all = {_x ammo "1715_Seapat"} forEach _musketers; hint format["%1", _all]; so i want the loaded ammo count for each unit from a gorup.If i loop throug them the script returns nothing but if i run the ammo code individually like this _ammocount = _musketer ammo "1715_Seapat"; it returns the loaded ammo.How can i return all the loaded ammo from a group? Share this post Link to post Share on other sites
gc8 977 Posted October 1, 2020 _all = 0; { _all = _all + (_x ammo "1715_Seapat"); } forEach _musketers; hint format["%1", _all]; should do it, code not tested 1 Share this post Link to post Share on other sites
Spriterfight 10 Posted October 1, 2020 12 minutes ago, gc8 said: _all = 0; { _all = _all + (_x ammo "1715_Seapat"); } forEach _musketers; hint format["%1", _all]; should do it, code not tested my squad conatins two unit the player and the teammate.If i fire it retruns 0 but it sohuld return 1 because my teammate hasn't shot yet.The 1715_Seapat has only 1 round in the magazine. Share this post Link to post Share on other sites
Spriterfight 10 Posted October 1, 2020 13 minutes ago, Spriterfight said: my squad conatins two unit the player and the teammate.If i fire it retruns 0 but it sohuld return 1 because my teammate hasn't shot yet.The 1715_Seapat has only 1 round in the magazine. Meanwhile i realised the rifle was not 1715_Seapat so i renamed it and now works.Thank you Share this post Link to post Share on other sites