BIS fnc loadInventory: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Fix note) |
||
Line 30: | Line 30: | ||
{{Note | {{Note | ||
|user= Ilias38rus | |user= Ilias38rus | ||
| | |timestamp= 20200802152100 | ||
|text= Doesn't work for backpacks in backpack, unlike [[setUnitLoadout]]. | |text= Doesn't work for backpacks in backpack, unlike [[setUnitLoadout]]. | ||
}} | }} |
Revision as of 15:04, 18 December 2021
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:
- Inventory
Syntax
- Syntax:
- param call BIS_fnc_loadInventory
- Parameters:
- Object - unit to receive the loadout
- Config or Array - can be one of:
- Array - (Optional, default []) array of Strings that define what part of the loadout to ignore, e.g ["weapons", "uniform"]
- Return Value:
- Boolean
Examples
- Example 1:
loadout = [player, configFile >> "CfgVehicles" >> "B_Soldier_SL_F"] call BIS_fnc_loadInventory; // gives BLUFOR Squad Leader's loadout to player unit
- Example 2:
- to save and load the inventory:
[player, [missionNamespace, "TAG_SavedInventory"]] call BIS_fnc_saveInventory; // save it [player, [missionNamespace, "TAG_SavedInventory"]] call BIS_fnc_loadInventory; // load it
Additional Information
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
- Posted on Aug 02, 2020 - 15:21 (UTC)
- Doesn't work for backpacks in backpack, unlike setUnitLoadout.