Page MenuHomeFeedback Tracker

Option to disable actions on an object, (or disable ammo crate Inventory access)
New, WishlistPublic


Sounds odd, but for the case where you have a "composition of objects" stacked together, such as many crates and steel box containers, it leaves all of the Inventory menus accessible to every one of those crates, even if empty.

If you wish to treat that composition as 1 single object with a single purpose, then you would want those multiple individual Inventory menu options disabled.

There is already a solution to this if you are creating an addon, but if you want a scripting only solution, it seems you would need another script command.


Legacy ID
Feature Request
Additional Information

Here are several methods I can think of to achieve this fairly easily.

Method 1)
Similar to how we can totally disable automatic vehicle rearming/refueling/repairing on a vehicle crate, using:
_vehicleCrate setAmmoCargo 0;
_vehicleCrate setFuelCargo 0;
_vehicleCrate setRepairCargo 0;

We could have similar commands to disable/change Inventory capacities with script commands, like:
_crate setTransportMaxMagazines 1000;
_crate setTransportMaxWeapons 500;
_crate setTransportMaxBackpacks 30;

which of course, correspond directly with the crate's class definition:
class Box_NATO_Wps_F: NATO_Box_Base

transportMaxMagazines = 1e+009;
transportMaxWeapons = 1e+009;
transportMaxBackpacks = 0;


Method 2)
Add a new script command, like:
disableAllActions _crate;

which would also disable the keys associated with activating that action.

Method 3)
Add a new script command, like:
_crate disableAction ACTION_ID_INVENTORY;

If you wanted to further separate the Action Menu from the Action Key, then you would need another script command to disable the Action Key too.
_crate disableActionKey ACTION_ID_INVENTORY;

However, I am unsure how you would specify the relevant ACTION_ID to disable.
You could possibly use the key action names from:

Event Timeline

Dr_Eyeball edited Additional Information. (Show Details)
Dr_Eyeball set Category to Feature Request.
Dr_Eyeball set Reproducibility to Always.
Dr_Eyeball set Severity to None.
Dr_Eyeball set Resolution to Open.
Dr_Eyeball set Legacy ID to 3392106454.May 7 2016, 4:08 PM