BIS fnc loadInventory: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (example)
No edit summary
Line 33: Line 33:
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[soldier1, [soldier1, "loadout"]] [[call]] [[BIS_fnc_saveInventory]]; //save inventory into object variable called "loadout".
|x1= <code>[soldier1, [ [[missionNamespace]], "loadout"]] [[call]] [[BIS_fnc_saveInventory]]; //save inventory into variable called "loadout".
[ [[player]], [ soldier1, "loadout"]] [[call]] [[BIS_fnc_loadInventory]]; //load inventory from variable "loadout" onto player</code> |=
[ [[player]], [ [[missionNamespace]], "loadout"]] [[call]] [[BIS_fnc_loadInventory]]; //load inventory from variable "loadout" onto player</code> |=
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 21:12, 29 September 2014


Hover & click on the images for description

Description

Description:
/*

	Description:
	Add config defined inventory to an unit

	Parameter(s):
		0: OBJECT - object which will receive the loadout
		1:
			CONFIG - link to CfgVehicles soldier or to CfgRespawnInventory
			ARRAY in format [NAMESPACE or GROUP or OBJECT,STRING] - inventory saved using BIS_fnc_saveInventory
		2: ARRAY of STRINGs - config entries to be ignored (e.g. "weapons", "uniform", ...)

	Returns:
	BOOL
*/
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
Syntax needed
Return Value:
Bool

Examples

Example 1:
[soldier1, [ missionNamespace, "loadout"]] call BIS_fnc_saveInventory; //save inventory into variable called "loadout". [ player, [ missionNamespace, "loadout"]] call BIS_fnc_loadInventory; //load inventory from variable "loadout" onto player

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