addBackpackCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " " to " ")
No edit summary
 
(30 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma2oa
|game1= arma2oa
|1.55
|version1= 1.55
 
|game2= tkoh
|version2= 1.00
 
|game3= arma3
|version3= 0.50


|arg= global
|arg= global
Line 10: Line 16:
|gr1= Containers
|gr1= Containers


| Add backpack(s) to the cargo space of vehicle. Classname list of available backpacks is [[Arma 2 OA: Backpacks|here]].
|descr= Add backpack(s) to the cargo space of vehicle. Classname list of available backpacks is [[Arma 2: Operation Arrowhead: Backpacks|here]].
{{Feature|arma3|In Arma 3, arguments for this command are local ({{Icon|localArgument|32}}). For global variant see [[addBackpackCargoGlobal]]}}
For a list of possible backpacks, see:
* {{GVI|arma2|1.50}} [[Arma 2: Operation Arrowhead: Backpacks]]
* {{GVI|arma3|1.00}} [[Arma 3: CfgVehicles Equipment]] (starting with {{hl|B_}})
{{Feature|arma3|In {{arma3}}, arguments for this command are local {{Icon|localArgument|32}}. For the global variant, see [[addBackpackCargoGlobal]].}}


|vehicle [[addBackpackCargo]] [backpackClassName, count]
|s1= vehicle [[addBackpackCargo]] [backpackClassName, count]


|p1= vehicle: [[Object]] - vehicle to add the backpack to
|p1= vehicle: [[Object]] - vehicle to add the backpack to


|p2= [backpackClassName, count]: [[Array]]
|p2= backpackClassName: [[String]] - backpack classname


|p3= backpackClassName: [[String]] - backpack classname
|p3= count: [[Number]] - number of backpacks to add. Since Arma 3 v2.14, negative count will remove backpacks.


|p4= count: [[Number]] - number of backpacks to add.
|r1= [[Nothing]]


| [[Nothing]]
|x1= <sqf>this addBackpackCargo ["TK_RPG_Backpack_EP1", 2];</sqf>


|x1= <code>[[Magic Variables#this_2|this]] [[addBackpackCargo]] ["TK_RPG_Backpack_EP1", 2];</code>
|x2= <sqf>_apc addBackpackCargo ["US_Patrol_Pack_EP1", 4];</sqf>


|x2= <code>_apc [[addBackpackCargo]] ["US_Patrol_Pack_EP1", 4];</code>
|seealso= [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[backpackItems]] [[addBackpack]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[backpackSpaceFor]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]]
 
|seealso= [[backpackContainer]], [[firstBackpack]], [[unitBackpack]], [[backpack]], [[backpackCargo]], [[getBackpackCargo]], [[backpackItems]], [[addBackpack]], [[addBackpackCargoGlobal]], [[removeBackpack]], [[clearBackpackCargo]], [[clearBackpackCargoGlobal]], [[clearAllItemsFromBackpack]], [[loadBackpack]], [[backpackSpaceFor]], [[canAddItemToBackpack]], [[addItemToBackpack]], [[removeItemFromBackpack]], [[everyBackpack]]
}}
}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 00:14, 1 February 2023

Hover & click on the images for description

Description

Description:
Add backpack(s) to the cargo space of vehicle. Classname list of available backpacks is here. For a list of possible backpacks, see:
Arma 3
In Arma 3, arguments for this command are local LALocal. For the global variant, see addBackpackCargoGlobal.
Groups:
Containers

Syntax

Syntax:
vehicle addBackpackCargo [backpackClassName, count]
Parameters:
vehicle: Object - vehicle to add the backpack to
backpackClassName: String - backpack classname
count: Number - number of backpacks to add. Since Arma 3 v2.14, negative count will remove backpacks.
Return Value:
Nothing

Examples

Example 1:
this addBackpackCargo ["TK_RPG_Backpack_EP1", 2];
Example 2:
_apc addBackpackCargo ["US_Patrol_Pack_EP1", 4];

Additional Information

See also:
backpackContainer firstBackpack unitBackpack backpack backpackCargo getBackpackCargo backpackItems addBackpack 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