getUnitLoadout: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(argument is not applicable as it is a normal getter, therefore global)
(Add alternative syntax and examples)
Line 4: Line 4:
| Returns an array with all assigned items, weapons, containers and their stored items.
| Returns an array with all assigned items, weapons, containers and their stored items.
Detailed explanation of the returned array: [[Talk:getUnitLoadout]]
Detailed explanation of the returned array: [[Talk:getUnitLoadout]]
{{warning|This command is not final and might be changed in a near future.}} |= Description
____________________________________________________________________________________________


{{warning|This command is not final and might be changed in a near future.}}
| [[getUnitLoadout]] unit |= Syntax
| [[getUnitLoadout]] unit|= Syntax
|p1= unit: [[Object]] |= Parameter 1
|p1= Unit: [[Object]] |= Parameter 1
 
| [[Array]] - Array containing all inventory items |= RETURNVALUE
| [[Array]] - Array containing all inventory items |= Return Value
|x1= <code>[[getUnitLoadout]] player;</code>|= EXAMPLE1
____________________________________________________________________________________________
|s2= [[getUnitLoadout]] class |= Syntax
|p21= class: [[String]] or [[Config]] |= Parameter 1
 
|r2= [[Array]] - Array containing all inventory items |= Return value
____________________________________________________________________________________________
|x1= <code>[[getUnitLoadout]] [[player]];</code>|=
|x2= <code>[[getUnitLoadout]] "B_Soldier_F";</code>|=
|x3= <code>[[getUnitLoadout]] ([[configFile]] >> "CfgVehicles" >> "B_Soldier_F");</code>|=


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

Revision as of 22:20, 17 April 2017

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
This command is not final and might be changed in a near future.
Groups:
Uncategorised

Syntax

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

Alternative Syntax

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

Examples

Example 1:
getUnitLoadout player;
Example 2:
getUnitLoadout "B_Soldier_F";
Example 3:
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