Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:Returns a list of arrays, containing information about each seat in the vehicle:
  • type: String - Proxy type. Can be "driver", "gunner", "commander" or "cargo".
  • position: Position3D - Seat position in model space (relative to the vehicle).
  • cargoID: Number - Index of cargo position.
  • unit: Object - Unit occupying that seat. objNull if empty.
  • turret: Array - Turret path. For non-gunner positions this element is not returned.

Note: This command does not work with GAME content. You can use fn vbs getCrewPos instead, which fixes this problem.

Syntax

Syntax:getCrewPos vehicle
Parameters:
  • vehicle: Object - Vehicle to check.
Return Value:Array - The same position can appear twice, since it may have more than one position type. This means that the number of elements in the array can be bigger than the number of vehicle positions. For example, if a cargo seat is also a gunner seat (if it has the turn-out ability), it is listed twice.

Examples

Examples:
_crewPositions = getCrewPos (vehicle player)

Mission to visualize crew positions: getCrewPos.zip

Additional Information

See also: turretUnit, assignedVehicleRole, crew, fn vbs findCargoPos
Multiplayer:
Problems:

Notes







Posted on Jan 21, 2011
Kronzky
Since getCrewPos does not currently return any "commander" roles, only "driver", "gunner" & "cargo", you will have to use the commander command to find him.