Page MenuHomeFeedback Tracker

Cannot load specific infantry weapons by script
Closed, ResolvedPublic


There currently is no way to load a specific weapon by script.

addPrimaryWeaponItem, addSecondaryWeaponItem, and addHandgunItem only read from the cfgWeapons class making it impossible to add a magazine directly into the weapon's magazine slot.

It hinders features for both addon-makers and mission-makers with that lack of fine control over weapon-items.

Please either expand the above commands to also read from cfgMagazines, or add new commands to specifically add magazines into a weapon. Preferably these add-commands would be accompanied by commands that let us see what magazine currently is loaded (other than currentMagazine which doesn't work for weapons not in hand), and that let us specifically remove magazines from weapons.


Legacy ID
Operating System
Windows 7

Event Timeline

Inkompetent edited Additional Information. (Show Details)
Inkompetent set Category to Scripting.
Inkompetent set Reproducibility to N/A.
Inkompetent set Severity to Minor.
Inkompetent set Resolution to Open.
Inkompetent set Legacy ID to 3694905204.May 7 2016, 12:38 PM
Kirill added a subscriber: Kirill.May 7 2016, 12:38 PM

Absolutly needed

Bumping this issue as it is needed and it would be a sad thing to see it mass-closed for inactivity.

As my group is using AT-4 anti tank rocket launcher (which is disposable in real life), it would be most helpful to be able to automatically load a rocket in that launcher, without my mates being forced to do it manually.

You can add magazines directly to weapons now

player addWeaponItem ["launch_B_Titan_short_F", "Titan_AT"]

Oh, fair enough, thanks !

dedmen added a subscriber: dedmen.Sep 13 2017, 11:21 AM

Fixed. Can be closed.

LouMontana closed this task as Resolved.Nov 6 2020, 2:43 PM
LouMontana updated the task description. (Show Details)
LouMontana edited Steps To Reproduce. (Show Details)
LouMontana edited Additional Information. (Show Details)
LouMontana set Operating System to Windows 7.