Page MenuHomeFeedback Tracker

Command addWeapon does not function on vehicles any longer.
Closed, ResolvedPublic

Description

With a vehicle you may remove weapons but not add weapons to vehicles. This functionality was present in Arma 2. Removing the current vehicle weapon gets rid of it, but using addWeapon does not replace it in the weapons list and the weapons command returns an empty array.

Details

Legacy ID
1039901910
Severity
Major
Resolution
Open
Reproducibility
Always
Category
Scripting

Event Timeline

Nou edited Steps To Reproduce. (Show Details)Mar 6 2013, 2:52 AM
Nou edited Additional Information. (Show Details)
Nou set Category to Scripting.
Nou set Reproducibility to Always.
Nou set Severity to Major.
Nou set Resolution to Open.
Nou set Legacy ID to 1039901910.May 7 2016, 10:44 AM
Bohemia added a subscriber: MaHuJa.Mar 6 2013, 2:52 AM

Confirming this as well, it seems to be a bug since addMagazine functions just fine and you can add any magazines you want for vehicle.

Is this yet another case of needing to use additem instead?

Nou added a subscriber: Nou.May 7 2016, 10:44 AM
Nou added a comment.Mar 27 2013, 1:19 AM

Would that work with a vehicle MaHuJa?

No idea - the only tests I've done so far are with infantry, but that has shown that although addweapon doesn't give an error, it doesn't always work. But additem does. As I understood it you encountered something similar wrt itemradio?

I'd love a technical explanation from BIS on the difference between the two in the game code, and why one is appropriate over the other.

I'm thinking to perform this test when I can:
Place a hunter MG
1: Remove its weapon by script. (Expected: Weapon no longer selected, cannot fire, can still look around in the sights)
2: Add by addweapon (Expected: The behavior described in this ticket)
3: Remove addweaponed weapon.
4: Add by additem (Expected: The weapon is again usable.)
with both 2 and 4 also adding at least one magazine for it.
Probably easiest done by putting the code for 1&3, 2 and 4 in radio triggers.

Closing due to lack of activity in over five months. If this issue is still reproducable for you, please create a new ticket for it or ask for this one to be re-opened.