setUnitLoadout: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(argument is global)
m (Removed warning about command note being finished)
Line 6: Line 6:
| Creates a loadout from given inventory structure and applies it to a unit.
| Creates a loadout from given inventory structure and applies it to a unit.


{{warning|This command is not final and might be changed in a near future.}}
| unit [[setUnitLoadout]] [loadout, rearm]|= Syntax
| unit [[setUnitLoadout]] [loadout, rearm]|= Syntax
|p1= unit: [[Object]] |= Parameter 1
|p1= unit: [[Object]] |= Parameter 1

Revision as of 10:03, 10 May 2018

Hover & click on the images for description

Description

Description:
Creates a loadout from given inventory structure and applies it to a unit.
Groups:
Uncategorised

Syntax

Syntax:
unit setUnitLoadout [loadout, rearm]
Parameters:
unit: Object
loadout: Array - loadout array from getUnitLoadout
rearm (Optional): Boolean - Partially emptied magazines will be refilled when the loadout is applied - Default: false
Return Value:
Nothing

Examples

Example 1:
_loadout = getUnitLoadout player_1 ; player_2 setUnitLoadout _loadout;//Copies loadout from player_1 and applies it to player_2

Additional Information

See also:
getUnitLoadout

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