FriZY_SK 9 Posted October 1, 2018 Hello, I am using BIS respawn menu in MP mission. I would like to have possibility change loadout (defined in description.ext) anytime in mission (not only after respawn). Actually I dont know how to check limits per roles which are already used. Could you help me with this problem? Maybe someone already create such script or whole GUI for that. Thanks Share this post Link to post Share on other sites
Harzach 2507 Posted October 1, 2018 13 minutes ago, FriZY_SK said: I would like to have possibility change loadout (defined in description.ext) anytime in mission (not only after respawn) You could place addActions on an object to call loadout scripts on the player, that's easy. I've never played around with loadouts defined in description.ext, so not sure how they can be accessed. Share this post Link to post Share on other sites
FriZY_SK 9 Posted October 1, 2018 hmm, I am usig BIS respawn/inventory system. So, problem is which function and which attributes I have to call. Definetly it is not easy task. ["open"] call BIS_fnc_showRespawnMenu function is not working this way. Share this post Link to post Share on other sites
FriZY_SK 9 Posted October 5, 2018 no answer so, I tried to summarize my question once again... HOW TO CHANGE LOADOUT OF PLAYER in consideration of: change has to be done during playing when player is alive (not in BIS respawn menu) inventories are defined in description.ext (class CfgRespawnInventory) limits per role has to be kept So, far I have issue with detecting selected respawn inventory. Command (2.) below returns empty array if I selected respawn inventory which was assigned diretly to object(1.). Inventories assigned to missionnamespace (3.) are OK. So, object has respawn inv from namespace and from object itself. Inventories assigned to directly to object/player are select-able in respawn menu. 1. [call compile playerSTR, "INV_Ofc"] call BIS_fnc_addRespawnInventory; 2. a6 getVariable ["BIS_RscRespawnControls_inventory",[]]; 3. [missionNamespace, ["INV_MG",0,2]] call BIS_fnc_addRespawnInventory; So, I can just check which uniq weapon/item have all players and count it ...create whole UI and so on..but it is stange to do it this way. Share this post Link to post Share on other sites
FriZY_SK 9 Posted October 14, 2018 So, if nobody here know how to handle it ....I will share my findings after reverse engineering of BIS functions It seems to work fine for me. GET LIMIT FROM missionnamespace ["get",[missionnamespace,<roleClassNewFromDescription.ext>,""]] call BIS_fnc_showRespawnMenuInventoryLimit; UPDATE LIMIT for new role ["change",[missionnamespace,<roleClassSNewFromDescription.ext>,<inventoryClassNewFromDescription.ext>] + [-1]] call BIS_fnc_showRespawnMenuInventoryLimit; UPDATE LIMIT for old role ["change",[missionnamespace,<roleClassOldFromDescription.ext>,<inventoryClassOldFromDescription.ext>] + [+1]] call BIS_fnc_showRespawnMenuInventoryLimit; UPDATE variable on player _fncData = [missionnamespace,<roleClassNewFromDescription.ext>,<inventoryClassNewFromDescription.ext>]; player setVariable ["BIS_RscRespawnControls_inventory", _fncData, true]; CHANGE INVENTORY [player, <inventoryClassNewFromDescription.ext>] call bis_fnc_loadinventory; GET INVENTORY NAME getText (missionConfigFile >> "CfgRespawnInventory" >> <inventoryClassNewFromDescription.ext> >> "displayName"); Share this post Link to post Share on other sites