backpackContainer: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[[Cc]ategory:[ _]?Arma[ _]3:[ _]([^|]*)[ _]?\|.*\]\]" to "{{GameCategory|arma3|$1}}")
m (Some wiki formatting)
 
(55 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.04


|1.04|Game version=
|gr1= Containers


|gr1 = Containers |GROUP1=
|descr= Returns a cargo container of a unit's backpack.


|s1= [[backpackContainer]] unit


____________________________________________________________________________________________
|p1= unit: [[Object]] - a soldier


| Returns a cargo container of a unit's backpack. |DESCRIPTION=
|r1= [[Object]] - cargo container or [[objNull]]
____________________________________________________________________________________________


| [[backpackContainer]] unit |SYNTAX=
|x1= <sqf>hint str backpackContainer player; // 1a5f7900# 163944: backpack_fast.p3d</sqf>


|p1= unit: [[Object]] - a soldier |PARAMETER1=
|x2= <sqf>
 
hint str getMagazineCargo backpackContainer player;
| [[Object]] - cargo container or [[objNull]] |RETURNVALUE=
/*
____________________________________________________________________________________________
returns e.g
 
|x1= <code>[[hint]] [[str]] [[backpackContainer]] [[player]]; {{cc|1a5f7900# 163944: backpack_fast.p3d}}</code>|EXAMPLE1=
 
|x2= <code>[[hint]] [[str]] [[getMagazineCargo]] [[backpackContainer]] [[player]];</code>
 
<pre>[
[
[
"APERSBoundingMine_Range_Mag",
[
"ClaymoreDirectionalMine_Remote_Mag",
"APERSBoundingMine_Range_Mag",
"SLAMDirectionalMine_Wire_Mag",
"ClaymoreDirectionalMine_Remote_Mag",
"DemoCharge_Remote_Mag"
"SLAMDirectionalMine_Wire_Mag",
],[
"DemoCharge_Remote_Mag"
3,
],[
2,
3,
2,
2,
1
2,
1
]
]
]
]</pre>|EXAMPLE2=
*/
</sqf>


|x3= <code>([[backpackContainer]] [[player]]) [[addWeaponCargoGlobal]] [<nowiki/>[[weapons]] [[player]] [[select]] 0,1];</code>|EXAMPLE3=
|x3= <sqf>(backpackContainer player) addWeaponCargoGlobal [weapons player select 0, 1];</sqf>
____________________________________________________________________________________________


| [[firstBackpack]], [[unitBackpack]], [[backpack]], [[backpackCargo]], [[getBackpackCargo]], [[backpackItems]], [[addBackpack]], [[addBackpackCargo]], [[addBackpackCargoGlobal]], [[removeBackpack]], [[clearBackpackCargo]], [[clearBackpackCargoGlobal]], [[clearAllItemsFromBackpack]], [[loadBackpack]], [[backpackSpaceFor]], [[canAddItemToBackpack]], [[addItemToBackpack]], [[removeItemFromBackpack]], [[everyBackpack]], [[uniformContainer]], [[vestContainer]], [[everyContainer]] |SEEALSO=
|seealso= [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[backpackItems]] [[addBackpack]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[backpackSpaceFor]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]] [[uniformContainer]] [[vestContainer]] [[everyContainer]]
}}


| |MPBEHAVIOUR=  
{{Note
|user= ffur2007slx2_5
|timestamp= 20140429151900
|text= In {{arma3}} ver 1.16, we can use either [[backpackContainer]] or [[unitBackpack]] at present since both of them enjoy same operand type and return value.
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on Apr 29, 2014 - 15:19
<dt class="note">[[User:ffur2007slx2_5|ffur2007slx2_5]]
<dd class="note">
In ArmA3 ver 1.16, we can use either [[backpackContainer]] or [[unitBackpack]] at present since both of them enjoy same operand type and return value.
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
{{GameCategory|arma3|New_Scripting_Commands_List}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 14:06, 13 May 2022

Hover & click on the images for description

Description

Description:
Returns a cargo container of a unit's backpack.
Groups:
Containers

Syntax

Syntax:
backpackContainer unit
Parameters:
unit: Object - a soldier
Return Value:
Object - cargo container or objNull

Examples

Example 1:
hint str backpackContainer player; // 1a5f7900# 163944: backpack_fast.p3d
Example 2:
hint str getMagazineCargo backpackContainer player; /* returns e.g [ [ "APERSBoundingMine_Range_Mag", "ClaymoreDirectionalMine_Remote_Mag", "SLAMDirectionalMine_Wire_Mag", "DemoCharge_Remote_Mag" ],[ 3, 2, 2, 1 ] ] */
Example 3:
(backpackContainer player) addWeaponCargoGlobal [weapons player select 0, 1];

Additional Information

See also:
firstBackpack unitBackpack backpack backpackCargo getBackpackCargo backpackItems addBackpack addBackpackCargo addBackpackCargoGlobal removeBackpack clearBackpackCargo clearBackpackCargoGlobal clearAllItemsFromBackpack loadBackpack backpackSpaceFor canAddItemToBackpack addItemToBackpack removeItemFromBackpack everyBackpack uniformContainer vestContainer everyContainer

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
ffur2007slx2_5 - c
Posted on Apr 29, 2014 - 15:19 (UTC)
In Arma 3 ver 1.16, we can use either backpackContainer or unitBackpack at present since both of them enjoy same operand type and return value.