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


Introduced in

Version:1.47

Description

Description:

Marks a vehicle seat as blocked, so that neither AI nor players can use it.

Note: Blocking already used seats does not remove the occupying unit.

Syntax

Syntax:vehicle setBlockedSeat [seat, index, blocked]
Parameters:
  • vehicle: Object - Affected vehicle.
  • seat: String - Type of seat. Can be:
    • "Driver"
    • "Turret"
    • "Cargo"
    • "Commander" (refers to the commander seat, not the commanding unit).
  • index: Number or Array - Index of cargo position (Number) or turret path (Array). Unused with "Driver" and "Commander".
  • blocked: Boolean - If true, then the seat gets blocked; if false, it gets unblocked (optional, default: true).
Return Value:Nothing

Examples

Examples:
veh1 setBlockedSeat["Driver"];           // blocks the driver seat
veh1 setBlockedSeat["Cargo",1];          // blocks cargo seat #1
veh1 setBlockedSeat["Turret",[0,1]];     // blocks turret position [0,1]
veh1 setBlockedSeat["Driver",[0],false]; // unblocks the driver seat

Additional Information

See also: getBlockedSeats, lockDriver, lockCargo, lockTurret
Multiplayer:
Problems:

Notes