Page MenuHomeFeedback Tracker

InventoryOpened Event Handler does not receive link to WeaponHolderSimulated that is displayed
Feedback, NormalPublic

Description

It appears that when a soldier with primary and secondaries weapons is killed, WeaponHolderSimulated instances are spawned for each of those weapons.

When accessing inventory on the dead soldier, the soldier's gear is shown along with the contents of 1 weaponHolder, but not the other. (Seems to be the primary weapon, unless I access inventory specifically on the launcher).

In all cases the Event Handler receives [player, corpse, objNull] with no reference to the weapon holder active. Because there may be 2 weapon holders linked to the corpse, but only 1 is shown with the corpse items at a time, it's not possible to identify which weapon holder is shown in inventory, and therefore prevents scripting interactions with it.

It seems that accessing inventory on a corpse should simply show the contents of all linked weapon holders, for general ease of use. It would also be helpful to have references to those weapon holders passed to the event handler, or have a command to get all linked weapon holders for a corpse.

If not going down the above route of showing all weapon holders together, then a reference to the weapon holder that is shown in inventory is needed for InventoryOpened event handlers.

Thanks.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  1. player addEventHandler ["InventoryOpened", { systemChat str _this }];
  1. Access inventory on a dead soldier who had a primary and a launcher

Event Timeline

Correction: sometimes I can see contents of both weapon holders when accessing corpse: e.g. when I shoot solder in the torso from behind, but not when shooting in the head from behind. So perhaps it is to do with how far from the character the weapons fall.

dedmen set Ref Ticket to AIII-55631.Mar 27 2023, 3:48 PM
dedmen changed the task status from New to Feedback.Aug 1 2024, 6:30 PM