BIS fnc loadInventory: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (GVI http://dev.arma3.com/post/spotrep-00004 First mentioned here, could be 0.50 (no evidence))
No edit summary
Line 39: Line 39:
[[Category:Functions|{{uc:loadInventory}}]]
[[Category:Functions|{{uc:loadInventory}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:loadInventory}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:loadInventory}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on August 8, 2015 - 17:18 (UTC)</dd>
<dt class="note">[[User:Drunken Officer|Drunken Officer]]</dt>
<dd class="note">
to save and load the inventory <br />
//--- save it<br />
[player, [missionNamespace, "Var_SavedInventory"]] call BIS_fnc_saveInventory;<br /><br />
//--- load it<br />
[player, [missionNamespace, "Var_SavedInventory"]] '''call BIS_fnc_loadInventory;'''
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 19:18, 8 August 2015


Hover & click on the images for description

Description

Description:
Adds a predefined loadout (either via CfgVehicles, CfgRespawnInventory, or a custom inventory saved via BIS_fnc_saveInventory) to a specified unit.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
param call BIS_fnc_loadInventory;
Parameters:
Object - Unit to receive the loadout.
Config - Config entry of loadout found in either CfgVehicles or CfgRespawnInventory, OR:
Array - Array of Strings that define what part of the loadout to ignore. Example "weapons", "uniform". Optional parameter.
Return Value:
Boolean

Examples

Example 1:
loadout = [player,configfile >> "CfgVehicles" >> "B_Soldier_SL_F"] call BIS_fnc_loadInventory; // Gives loadout of BLUFOR Squad Leader to player unit.

Additional Information

See also:
BIS_fnc_saveInventoryBIS_fnc_exportInventoryBIS_fnc_deleteInventory

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section

Posted on August 8, 2015 - 17:18 (UTC)
Drunken Officer
to save and load the inventory
//--- save it
[player, [missionNamespace, "Var_SavedInventory"]] call BIS_fnc_saveInventory;

//--- load it
[player, [missionNamespace, "Var_SavedInventory"]] call BIS_fnc_loadInventory;