Page MenuHomeFeedback Tracker

Add script commands "addPrimaryWeaponMagazine" and "addSecondaryWeaponMagazine"
Closed, ResolvedPublic

Description

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.

Details

Legacy ID
1414450495
Severity
None
Resolution
Fixed
Reproducibility
N/A
Operating System
Windows 7
Category
Scripting

Event Timeline

bux578 edited Steps To Reproduce. (Show Details)Nov 2 2014, 11:04 AM
bux578 edited Additional Information. (Show Details)
bux578 set Category to Scripting.
bux578 set Reproducibility to N/A.
bux578 set Severity to None.
bux578 set Resolution to Open.
bux578 set Legacy ID to 1414450495.May 7 2016, 7:44 PM
bux578 edited a custom field.
bux578 added a subscriber: bux578.May 7 2016, 7:44 PM

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.

commy2 added a subscriber: commy2.May 7 2016, 7:44 PM

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

bux578 added a comment.Dec 9 2014, 2:46 PM

@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

I can confirm a problem.. will be solved in a week

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?

commy2 added a comment.Aug 7 2015, 5:15 PM

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?

Commands need wiki pages.

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.

commy2 added a comment.Oct 9 2015, 4:47 PM

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.

"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 ;-)

Early Christmas gift? :)

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"

commy2 added a comment.Nov 3 2015, 1:44 PM

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.

commy2 added a comment.Nov 3 2015, 1:44 PM

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.

Still broken. Commy2 gave steps to reproduce.

Still broken in 1.71 dev.

This comment was removed by Raimonds.

Still broken?

it has "instant" param now

BIS_fnc_KK closed this task as Resolved.Sep 4 2020, 8:21 AM
BIS_fnc_KK changed Resolution from Open to Fixed.
BIS_fnc_KK edited Steps To Reproduce. (Show Details)
BIS_fnc_KK edited Additional Information. (Show Details)
BIS_fnc_KK set Operating System to Windows 7.