getCargoIndex: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (global args)
m (template:command argument fix)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns index of the unit in cargo. 0,1,2... or -1 if not in cargo. |= Description
| Returns index of the unit in cargo. 0,1,2... or -1 if not in cargo. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| vehicle '''getCargoIndex''' unit |= Syntax
| vehicle '''getCargoIndex''' unit |SYNTAX=


|p1= vehicle: [[Object]] |= Parameter 1
|p1= vehicle: [[Object]] |PARAMETER1=


|p2= unit: [[Object]] |= Parameter 2
|p2= unit: [[Object]] |PARAMETER2=


| [[Number]] |= Return value
| [[Number]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[player]] [[moveInCargo]] heli;
|x1= <code>[[player]] [[moveInCargo]] heli;
[[hint]] [[str]] (heli [[getCargoIndex]] [[player]]);</code> |= Example 1
[[hint]] [[str]] (heli [[getCargoIndex]] [[player]]);</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[moveInCargo]], [[assignAsCargoIndex]], [[emptyPositions]]|= See also
| [[moveInCargo]], [[assignAsCargoIndex]], [[emptyPositions]]|SEEALSO=


}}
}}

Revision as of 14:39, 7 April 2019

Hover & click on the images for description

Description

Description:
Returns index of the unit in cargo. 0,1,2... or -1 if not in cargo.
Groups:
Uncategorised

Syntax

Syntax:
vehicle getCargoIndex unit
Parameters:
vehicle: Object
unit: Object
Return Value:
Number

Examples

Example 1:
player moveInCargo heli; hint str (heli getCargoIndex player);

Additional Information

See also:
moveInCargoassignAsCargoIndexemptyPositions

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

Bottom Section