backpackContainer: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''backpackContainer''' unit |SYNTAX=
| [[backpackContainer]] unit |SYNTAX=


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


| [[Object]] - cargo container or <NULL-object>  |RETURNVALUE=  
| [[Object]] - cargo container or [[objNull]] |RETURNVALUE=
____________________________________________________________________________________________


 
|x1= <code>[[hint]] [[str]] [[backpackContainer]] [[player]]; {{cc|1a5f7900# 163944: backpack_fast.p3d}}</code>|EXAMPLE1=  
|x1= <code>[[hint]] [[str]] [[backpackContainer]] [[player]]; //1a5f7900# 163944: backpack_fast.p3d
</code>|EXAMPLE1=  


|x2= <code>[[hint]] [[str]] [[getMagazineCargo]] [[backpackContainer]] [[player]];</code>
|x2= <code>[[hint]] [[str]] [[getMagazineCargo]] [[backpackContainer]] [[player]];</code>
Line 36: Line 35:
]</pre>|EXAMPLE2=  
]</pre>|EXAMPLE2=  


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


Line 42: Line 41:


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=  
____________________________________________________________________________________________
}}
}}


Line 49: Line 47:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on Apr 29, 2014 - 15:19
<dd class="notedate">Posted on Apr 29, 2014 - 15:19
<dt class="note">'''[[User:ffur2007slx2_5|ffur2007slx2_5]]'''
<dt class="note">[[User:ffur2007slx2_5|ffur2007slx2_5]]
<dd class="note">
<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.
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.
Line 59: Line 57:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Containers|{{uc:{{PAGENAME}}}}]]

Revision as of 19:13, 25 November 2019

Hover & click on the images for description

Description

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

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;
[
	[
		"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:
firstBackpackunitBackpackbackpackbackpackCargogetBackpackCargobackpackItemsaddBackpackaddBackpackCargoaddBackpackCargoGlobalremoveBackpackclearBackpackCargoclearBackpackCargoGlobalclearAllItemsFromBackpackloadBackpackbackpackSpaceForcanAddItemToBackpackaddItemToBackpackremoveItemFromBackpackeveryBackpackuniformContainervestContainereveryContainer

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

Notes

Posted on Apr 29, 2014 - 15:19
ffur2007slx2_5
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.

Bottom Section