It would be nice to have these script commands. They wouldn't rely on having enough space in the inventory just to add a magazine.
Description
Details
- Legacy ID
- 1414450495
- Severity
- None
- Resolution
- Fixed
- Reproducibility
- N/A
- Operating System
- Windows 7
- Category
- Scripting
Event Timeline
Of course not to forget: "addHandgunMagazine".
"removeSecondaryWeaponItem" is missing too.
Maybe it will be better to expand existing addXXXWeaponItem, removeXXXWeaponItem to include magazines, since they already deal with cargo space of the weapon.
Kinda related. There is no removeSecondaryWeaponItem or removeAllSecondaryWeaponItems command, even though the equivalents for primary weapons and handguns exist.
There is currently no secondary weapon item in the game, but mods like Bundeswehr Mod Arma3 do have some.
changes since DEV. 128618:
Added:
player addWeaponItem [weaponName,itemName(even magName)]
or
player addWeaponItem [weaponName,["magName",ammoCount,"muzzleName"]];
Also added:
removeSecondaryWeaponItem (same as removePrimaryWeaponItem)
changes:
addXXXWeaponItem/removeXXXWeaponItem now works also with magazines. Furthermore for AddXXXWeaponItems works additional syntax ["magName",ammoCount,"muzzleName"]
will be distributed tomorrow
@japapatramtara
Thank you! Děkujeme!
Could you have a look at http://feedback.arma3.com/view.php?id=22000 It's similar. Not for players but for cargo. That would be awesome.
- spawn { player removeprimaryweaponitem "30Rnd_65x39_caseless_mag"; works sleep 1; player addprimaryweaponitem "30Rnd_65x39_caseless_mag"; works sleep 1; player removeprimaryweaponitem "1Rnd_HE_Grenade_shell"; works sleep 1; player addprimaryweaponitem "1Rnd_HE_Grenade_shell"; doesnt add back
}
this also doesnt work
player addweaponitem [primaryweapon player, "1Rnd_HE_Grenade_shell"];
This also doesnt work
player addWeaponItem [currentWeapon player,["1Rnd_HE_Grenade_shell",1,currentMuzzle player]];
same as this
player addWeaponItem ["arifle_MX_GL_ACO_F",["1Rnd_HE_Grenade_shell",1,"GL_3GL_F"]];
doesnt add either
and...
player addprimaryweaponitem ["1Rnd_HE_Grenade_shell",1,"GL_3GL_F"];
generic error in expression
Thank you master! there is this another issue...
player addWeapon 'launch_B_Titan_short_F';
player selectWeapon 'launch_B_Titan_short_F';
player addSecondaryWeaponItem (getArray (
configFile >> "CfgWeapons" >> 'launch_B_Titan_short_F' >> "magazines"
) select 0);
player gets launcher and it has magazine but there is a reload time delay
any chance to skip the loading bar?
reload immediately = true?
What happened to this?
The commands are in stable branch since 8 months, but still broken for launchers. They also don't appear on the wiki. Can we use them without having to fear that they'll get removed or changed?
By the way, seems like japapatramtara (Bohemia Interactive - developer) 2014-12-10 08:34 never fixed the issue that he said would be solved in a week. I can confirm that muzzle magazines still don't work as Killzone_kid described.
Oh, and the command doesn't work with binoculars at all. ("Laserdesignator" with "Laserbatteries" magazine)
player addWeapon "Laserdesignator";
player addWeaponItem [binocular player, "Laserbatteries"];
"Polease Bohemia ;) Early Christmas gift..fix what you broke :P Noany hard feelings."
Your comment is incredibly annoying. What exactly are you asking for?
Well, sorry for incredibly annoying you Killzone_Kid, it wasn't my intent.
Either way, adding magazines to another muzzle doesn't work as mentioned above.
e.g. player addWeaponItem ["arifle_MX_GL_ACO_F",["1Rnd_HE_Grenade_shell",1,"GL_3GL_F"]];
Also, what commy2 said.
DEV. 133047(will be distributed tomorrow - 23.10.2015)
I've just modified commands:
addWeaponItem
addPrimaryWeaponItem
addSecondaryWeaponItem
addHandgunItem
they will find proper muzzle for given magazine now. Or you can specify muzzleName through addWeaponItem like:
player addWeaponItem["arifle_MXC_Holo_pointer_F",["30Rnd_65x39_caseless_mag",15,"muzzleName"]]
hope this change will help ;-)
Sounds great. Will there be a wiki entry for 'addWeaponItem' at one point too? It was never added.
Kind regards,
Sanchez
Great job. Glad to see this implemented.
Now I'm hoping for 22000/20583(duplicate), either way I'm already happy ^^
Thanks for adding this, will try it.
"Now I'm hoping for 22000/20583(duplicate)"
I second this.
There's still the reload time delay when doing e.g.:
player addSecondaryWeaponItem "NLAW_F"
Command does not work with "weapons" on the binocular slot.
player addWeapon "Laserdesignator";
player addWeaponItem ["Laserdesignator", "Laserbatteries"];
player addWeapon "Laserdesignator";
player addWeaponItem ["Laserdesignator", ["Laserbatteries", 1]];
player addWeapon "Laserdesignator";
player addWeaponItem ["Laserdesignator", ["Laserbatteries",1,"Laserdesignator"]];
None of these above add the laser battery magazine.
Command is broken for launchers.
player addWeapon "launch_RPG32_F";
player addWeaponItem ["launch_RPG32_F", ["RPG32_F", 1]];
player addWeapon "launch_RPG32_F";
player addSecondaryWeaponItem "RPG32_F";
Both cause the launcher to reload and a generic reloading sound to play.