getUnitLoadout: Difference between revisions
Lou Montana (talk | contribs) m (Remove syntaxhighlight spoiler hack) |
BrettMayson (talk | contribs) mNo edit summary |
||
| Line 34: | Line 34: | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
|r1= | |r1= [[Unit Loadout Array]] | ||
|s2= [[getUnitLoadout]] [unit, fullMagazines] | |s2= [[getUnitLoadout]] [unit, fullMagazines] | ||
| Line 42: | Line 42: | ||
|p22= fullMagazines: [[Boolean]] - [[true]] to top up used magazines | |p22= fullMagazines: [[Boolean]] - [[true]] to top up used magazines | ||
|r2= | |r2= [[Unit Loadout Array]] | ||
|s3= [[getUnitLoadout]] name | |s3= [[getUnitLoadout]] name | ||
| Line 48: | Line 48: | ||
|p41= name: [[String]] - {{hl|CfgVehicles}} classname from which to extract the loadout | |p41= name: [[String]] - {{hl|CfgVehicles}} classname from which to extract the loadout | ||
|r3= | |r3= [[Unit Loadout Array]] | ||
|s4= [[getUnitLoadout]] config | |s4= [[getUnitLoadout]] config | ||
| Line 54: | Line 54: | ||
|p61= config: [[Config]] - loadout config class | |p61= config: [[Config]] - loadout config class | ||
|r4= | |r4= [[Unit Loadout Array]] | ||
|x1= <sqf>getUnitLoadout player;</sqf> | |x1= <sqf>getUnitLoadout player;</sqf> | ||
Latest revision as of 07:55, 2 January 2026
Description
- Description:
- Returns a Unit Loadout Array with all assigned items, weapons, containers and their stored items.
- Groups:
- Unit Inventory
Syntax 1
- Syntax:
- getUnitLoadout unit
- Parameters:
- unit: Object
- Return Value:
- Unit Loadout Array
Syntax 2
- Syntax:
- getUnitLoadout [unit, fullMagazines]
- Parameters:
- unit: Object
- fullMagazines: Boolean - true to top up used magazines
- Return Value:
- Unit Loadout Array
Syntax 3
- Syntax:
- getUnitLoadout name
- Parameters:
- name: String - CfgVehicles classname from which to extract the loadout
- Return Value:
- Unit Loadout Array
Syntax 4
- Syntax:
- getUnitLoadout config
- Parameters:
- config: Config - loadout config class
- Return Value:
- Unit Loadout Array
Examples
- Example 1:
- getUnitLoadout player;
- Example 2:
- Example 3:
- getUnitLoadout "B_Soldier_F";
- Example 4:
- Example 5:
Additional Information
- See also:
- setUnitLoadout
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note