getUnitLoadout: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Removed note about command not being finished)
(alt syntax)
Line 11: Line 11:
| [[Array]] - Array containing all inventory items |= Return Value
| [[Array]] - Array containing all inventory items |= Return Value
____________________________________________________________________________________________
____________________________________________________________________________________________
|s2= [[getUnitLoadout]] class |= Syntax
|s2= [[getUnitLoadout]] [unit, fullMagazines] |= Syntax
|p21= class: [[String]] or [[Config]] |= Parameter 1
|p21 = [unit, fullMagazines]: [[Array]] |= Parameter 1
|p22= unit: [[Object]] |= Parameter 2
|p23= fullMagazines: [[Boolean]] |= Parameter 3


|r2= [[Array]] - Array containing all inventory items |= Return value
|r2= [[Array]] - Array containing all inventory items |= Return value
____________________________________________________________________________________________
|s3= [[getUnitLoadout]] name |= Syntax
|p41= name: [[String]] - class name |= Parameter 1
|r3= [[Array]] - Array containing all inventory items |= Return value
____________________________________________________________________________________________
|s4= [[getUnitLoadout]] config |= Syntax
|p61= config: [[Config]] - config class |= Parameter 1
|r4= [[Array]] - Array containing all inventory items |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
|x1= <code>[[getUnitLoadout]] [[player]];</code>|=
|x1= <code>[[getUnitLoadout]] [[player]];</code>|=
|x2= <code>[[getUnitLoadout]] "B_Soldier_F";</code>|=
|x2= <code>[[getUnitLoadout]] <nowiki>[</nowiki>[[player]], [[true]]];</code>|=
|x3= <code>[[getUnitLoadout]] ([[configFile]] >> "CfgVehicles" >> "B_Soldier_F");</code>|=
|x3= <code>[[getUnitLoadout]] "B_Soldier_F";</code>|=
|x4= <code>[[getUnitLoadout]] ([[configFile]] >> "CfgVehicles" >> "B_Soldier_F");</code>|=


| [[setUnitLoadout]]|= SEEALSO  
| [[setUnitLoadout]]|= SEEALSO  

Revision as of 15:36, 15 October 2018

Hover & click on the images for description

Description

Description:
Returns an array with all assigned items, weapons, containers and their stored items. Detailed explanation of the returned array: Talk:getUnitLoadout
Groups:
Uncategorised

Syntax 1

Syntax:
getUnitLoadout unit
Parameters:
unit: Object
Return Value:
Array - Array containing all inventory items

Syntax 2

Syntax:
getUnitLoadout [unit, fullMagazines]
Parameters:
[unit, fullMagazines]: Array
unit: Object
fullMagazines: Boolean
Return Value:
Array - Array containing all inventory items

Syntax 3

Syntax:
getUnitLoadout name
Parameters:
name: String - class name
Return Value:
Array - Array containing all inventory items

Syntax 4

Syntax:
getUnitLoadout config
Parameters:
config: Config - config class
Return Value:
Array - Array containing all inventory items

Examples

Example 1:
getUnitLoadout player;
Example 2:
getUnitLoadout [player, true];
Example 3:
getUnitLoadout "B_Soldier_F";
Example 4:
getUnitLoadout (configFile >> "CfgVehicles" >> "B_Soldier_F");

Additional Information

See also:
setUnitLoadout

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

Bottom Section

Notes

Bottom Section