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.
Description
Details
- Legacy ID
- 1039901910
- Severity
- Major
- Resolution
- Open
- Reproducibility
- Always
- Category
- Scripting
Event Timeline
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.
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.