Allow the setAmmo command (https://community.bistudio.com/wiki/setAmmo) to set the ammo count for a magazine to more than default capacity of the magazine.
Description
Details
- Legacy ID
- 2327735753
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Category
- Scripting
- Run the following:
player setAmmo [currentWeapon player, 2000];
Event Timeline
It would allow chambered rounds to be scripted in.
player setAmmo [currentWeapon player, (player ammo currentWeapon player)-1];
// do reload here
player setAmmo [currentWeapon player, (player ammo currentWeapon player)+1];
If the ammo count of the new magazine is 30/30 then you will simply be wasting a round.
Aaaah, clever :)
The only problem I see is that catching when a unit reloads is a bit hard, see this for more info: http://forums.bistudio.com/showthread.php?173330
From what I discovered, it is possible to catch a reload action (in a simple sense of the word) via
player addEventHandler ["Take", {if ((_this select 0) == (_this select 1) and {isClass (configFile >> "CfgMagazines" >> (_this select 2))}) then { hint "Reloaded"; }];
Could a 3rd param be added? Make it false by default, but when set to true it allows the magazine to be overfilled.
player setAmmo [currentWeapon player, 2000]; would just fill the magazine as it currently does
player setAmmo [currentWeapon player, 2000, true]; would set the magazine to 2000, regardless of the max