The newly introduced magazinesExt command (DEV Version: 0.75.108339) does not return the ammo count of loaded magazines.
Description
Details
- Legacy ID
- 2420245346
- Severity
- None
- Resolution
- No Bug
- Reproducibility
- Always
- Category
- Scripting
Add
magazinesExt player
to the debug console.
Fire some rounds with a rifle or a pistol without reloading, check magazinesExt player debug output.
magazinesExt does neither show the loaded magazines nor the ammo count of a loaded magazine.
It would be a thousand times easier to just have one command returning all magazines that are in the inventory of a unit or box.
Just one command which has additional info in the array, like for example:
[
["AmmoClassName", 26 /*ammo count*/, true /*currently loaded*/, 0 /* 0 = primary mag, 1 = secondary, 2 = handgun*/, "vest" /*stored in ...*/]
]
This would make it much easier to readd those magazines again after a MP respawn for example with addMagazinesExt or whatever it would be called.
Event Timeline
This is incorrect, it returns all stored magazines with correct ammo count. It does not count currently loaded magazine.
unload all magazines, leave the one in the weapon, command returns []. Fire few rounds and then move current magazine into inventory => magazine shows in array with correct ammo count
You are right, I didn't reload.
Anyway, the command should return the values for all magazines, loaded or not.
The command acts like magazinesdetail which also ignores loaded mag, only this one returns usable array.
If anything there should be another command like
currentMagazineExt to match currentMagazineDetail which would return loaded magazine.
PS. This command is also consistent with magazines, which doesnt return loaded mag, for which you use currentMagazine.
well.. [magazinesExt] has been renamed to [magazinesAmmo] since ver.108360 so take my apology in a situation when this change corrupted your scripts ;-)
the second thing: [magazinesAmmo] does NOT return already loaded magazines (e.g. magazine in handgun, etc.) just because we don't want that behavior for this command. If you need to get info about actually loaded magazines, you can simply use [weaponsItems](since 108367) or
[primaryWeaponMagazine],[secondaryWeaponMagazine] and [handgunWeaponMagazine]
and the last thing: we are trying to do our best in supporting community(which means guys like you :-) ) that's why we have decided to create one magazines command in addition named [magazinesAmmoFull] with this output format:
// output format // ["AmmoClassName" // ,26 /*ammo count*/ // , true /*currently loaded*/ // , 0 /* 1 = primary mag, 2 = handgun, 4 = secondary, 0 = grenade */ // , "vest"("uniform","backpack") /*stored in ...*/ or "muzzleName" (when currently loaded)]
this command will be available since 108423(tomorrow, I guess) and took me for more than four hours of my life so you're welcome and please give me a feedback ;-)
Great job with the magazinesAmmoFull command.
Now it would be totally cool if we could simply add back the output of magazinesAmmoFull to a unit/container with another command like addMagazinesAmmoFull :)
I personally preferred the name magazinesExt to magazinesAmmo as it describes command better
Killzone_Kid: as I do, but "THIS IS WAR" and I have to listen to my chief commander ;-)
@japapatramtara you're already my fav dev :)
I took the liberty and created wiki page for this command based on your input in this thread. Please review and correct as necessary: