Page MenuHomeFeedback Tracker

AssignItem and unAssignItem not working for weapon attachments
Closed, ResolvedPublic

Description

Very simply - the scripting commands AssignItem an unAssignItem do not work for weapon attachments.

The commands work for NVGs for example but do not move weapon items to/from the inventory. In some cases they will delete the weapon from inventory but not attach to gun. The same applies whether the slot is empty or full.

Details

Legacy ID
1071396630
Severity
Minor
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Create a infantry unit
add to the init line
diveSquad = group diver1; this moveInCargo boat; this addbackpack "B_AssaultPack_blk"; removeAllWeapons this; pack = unitBackpack this; this addMagazines ["30Rnd_65x39_case_mag",7]; this addMagazines ["16Rnd_9x21_Mag",3]; this addWeapon "arifle_TRG20_F"; this addPrimaryWeaponItem "optic_Hamr"; this addPrimaryWeaponItem "acc_flashlight"; this addPrimaryWeaponItem "muzzle_snds_H"; this addWeapon "hgun_P07_snds_F"; unitBackpack this addItemCargo ["NVGoggles",1]; unitBackpack this addItemCargo ["acc_pointer_IR",1];

Then create a trigger with
time > 20
as the condition, and on act
player assignItem "NVGoggles"; player assignItem "acc_pointer_IR";

Only the NVGs will equip.

Event Timeline

sproyd edited Steps To Reproduce. (Show Details)Apr 7 2013, 11:48 PM
sproyd edited Additional Information. (Show Details)
sproyd set Category to Scripting.
sproyd set Reproducibility to Always.
sproyd set Severity to Minor.
sproyd set Resolution to Open.
sproyd set Legacy ID to 1071396630.May 7 2016, 1:30 PM
MadDogX added a subscriber: MadDogX.May 7 2016, 1:30 PM

Mass closing ancient tickets with no activity for > 12 months; assume fixed or too trivial.

If this issue is still relevant in current dev build, please re-post.