addBackpack: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
m (adds backpack with items) |
||
Line 16: | Line 16: | ||
|gr1= Containers | |gr1= Containers | ||
|descr= Adds a backpack for a unit. If a unit already has a backpack, the old backpack will be placed on the ground under the unit. | |descr= Adds a backpack for a unit. If a unit already has a backpack, the old backpack will be placed on the ground under the unit. Items defined in the backpack's config will be added as well. | ||
{{Feature | Informative | | {{Feature | Informative | | ||
Classname list of available backpacks: | Classname list of available backpacks: | ||
Line 33: | Line 33: | ||
|x2= <code>_mySoldierDude [[addBackpack]] "US_Patrol_Pack_EP1";</code> | |x2= <code>_mySoldierDude [[addBackpack]] "US_Patrol_Pack_EP1";</code> | ||
|x3= <code>_mySoldierDude [[addBackpack]] "B_AssaultPack_mcamo_Ammo";{{cc|Adds backpack prefilled with items defined in its config}}</code> | |||
|seealso= [[addBackpackGlobal]] [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[backpackItems]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[backpackSpaceFor]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]] | |seealso= [[addBackpackGlobal]] [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[backpackItems]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[backpackSpaceFor]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]] | ||
}} | }} |
Revision as of 17:56, 23 February 2022
Description
- Description:
- Adds a backpack for a unit. If a unit already has a backpack, the old backpack will be placed on the ground under the unit. Items defined in the backpack's config will be added as well.
- Groups:
- Containers
Syntax
- Syntax:
- unit addBackpack backpackClassName
- Parameters:
- unit: Object
- backpackClassName: String
- Return Value:
- Nothing
Examples
- Example 1:
this addBackpack "TK_RPG_Backpack_EP1";
- Example 2:
_mySoldierDude addBackpack "US_Patrol_Pack_EP1";
- Example 3:
_mySoldierDude addBackpack "B_AssaultPack_mcamo_Ammo";// Adds backpack prefilled with items defined in its config
Additional Information
- See also:
- addBackpackGlobal backpackContainer firstBackpack unitBackpack backpack backpackCargo getBackpackCargo backpackItems addBackpackCargo addBackpackCargoGlobal removeBackpack clearBackpackCargo clearBackpackCargoGlobal clearAllItemsFromBackpack loadBackpack backpackSpaceFor canAddItemToBackpack addItemToBackpack removeItemFromBackpack everyBackpack
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