addBackpack: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " " to " ") |
Lou Montana (talk | contribs) m (Text replacement - "[[Arma 3 " to "[[Arma 3: ") |
||
(36 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma2oa | |game1= arma2oa | ||
|1. | |version1= 1.50 | ||
|game2= tkoh | |||
|version2= 1.00 | |||
|game3= arma3 | |||
|version3= 0.50 | |||
|arg= local | |arg= local | ||
Line 10: | Line 16: | ||
|gr1= Containers | |gr1= Containers | ||
| 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: | ||
* [[Arma 2 OA: Backpacks|Arma 2 OA backpacks]] | * [[Arma 2 OA: Backpacks|Arma 2 OA backpacks]] | ||
* [[Arma 3 CfgVehicles EMPTY|Arma 3 backpacks]] - objects starting with "B_", starts with "''B_AssaultPack_khk''" | * [[Arma 3: CfgVehicles EMPTY|Arma 3 backpacks]] - objects starting with "B_", starts with "''B_AssaultPack_khk''" | ||
}} | }} | ||
| unit [[addBackpack]] backpackClassName | |s1= unit [[addBackpack]] backpackClassName | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
|p2= | |p2= backpackClassName: [[String]] | ||
| [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>this addBackpack "TK_RPG_Backpack_EP1";</sqf> | ||
|x2= < | |x2= <sqf>_mySoldierDude addBackpack "US_Patrol_Pack_EP1";</sqf> | ||
|seealso= [[addBackpackGlobal]] | |x3= <sqf>_mySoldierDude addBackpack "B_AssaultPack_mcamo_Ammo";// Adds backpack prefilled with items defined in its config</sqf> | ||
|seealso= [[addBackpackGlobal]] [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[backpackItems]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[backpackSpaceFor]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]] | |||
}} | }} | ||
Latest revision as of 10:38, 6 May 2024
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:
- 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