Page MenuHomeFeedback Tracker

[Request] lockInventory alt syntax (or new command) to lock specific inventory slots
New, NormalPublic

Description

Currently it's possible to completely lock an inventory, but preventing transfers of specific items while allowing others is less simple. For example, if you want to stop players removing their uniform, you can't prevent it, you just have to find some way to immediately add it back (and all the items that were in it...). We can detect slot changes with the slotItemChanged EH, but it doesn't offer the ability to prevent the change.

It would be very convenient to be able to lock specific inventory slots based on their numerical ID. Using an alternative syntax of lockInventory, _unit lockInventory [_number, _bool], would be appropriate in my view, but a new command like _unit lockInventorySlot [_number, _bool] would also work if necessary.

This would allow missionmakers to prevent players from changing certain parts of their loadout, without restricting their ability to move around other items like consumables and magazines.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

NikkoJT created this task.Mar 16 2024, 11:05 PM
dedmen added a subscriber: dedmen.Apr 25 2024, 3:27 PM

Very unlikely. The inventory system is not maintainable and this would probably be very complex.