Casio91Fin 31 Posted November 14, 2021 Hey. Does anyone have an Inventory weight script. The only thing I've found is this, but I don't get it to work Quote player addEventHandler ["InventoryOpened", { [] spawn { waitUntil {!isNull (findDisplay 602)}; player addEventHandler ["InventoryClosed", { removeMissionEventHandler ["Draw3D", missionNamespace getVariable "WGP_UI_redraw"]; }]; _whileopen = addMissionEventHandler ["Draw3D", { _load = (round (loadAbs player * (1 / 2.2046) * 10 ^ 2 / 10)) / 10 ^ 2; }]; missionNamespace setVariable ["WGP_UI_redraw", _whileopen]; }; }]; Share this post Link to post Share on other sites
7erra 629 Posted November 16, 2021 What is your script supposed to do? There is the loadAbs command to return the weight of all items a unit is carrying Share this post Link to post Share on other sites
Casio91Fin 31 Posted November 16, 2021 4 hours ago, 7erra said: What is your script supposed to do? When a player opens their own inventory then somewhere in the corner of the inventory would show how much stuff the player is carrying "Kg" Share this post Link to post Share on other sites
Harzach 2516 Posted November 16, 2021 (edited) 4 hours ago, 7erra said: What is your script supposed to do? Convert to metric. *edit* lol, beat me by five seconds Edited November 16, 2021 by Harzach Share this post Link to post Share on other sites
Harzach 2516 Posted November 16, 2021 The thing is, mass in Arma is already metric, so this is sorta silly. Share this post Link to post Share on other sites
Melody_Mike 130 Posted November 17, 2021 The ACE mod displays this value in the inventory by default. It uses this function for the calculation. Note the use of CBA:https://github.com/acemod/ACE3/blob/master/addons/common/functions/fnc_getWeight.sqf But you will have to dig some more into the "common" functions and scripts to find how exactly this value is displayed to the player in their inventory screen. They have a slack and a GitHub where you can message with questions: https://github.com/acemod/ACE3 Good luck! Share this post Link to post Share on other sites
dimon 32 Posted November 20, 2023 Quote ((round (loadAbs player* (1 / 2.2046) * 10 ^ 2 / 10)) / 10 ^ 2) Share this post Link to post Share on other sites