CPropVehicleDriveable

From Source Entities
Jump to navigation Jump to search

CPropVehicleDriveable is a code class inherited by some vehicle entities. These vehicle props may be controlled by players or NPCs.

Classnames:

  • prop_vehicle_driveable (Available in all games. Bug: When players enter the vehicle, their camera will move to the wrong position and they will have no control over the vehicle, nor be able to exit.)

Keyvalues[edit | edit source]

Start locked (VehicleLocked) <boolean>
Makes the vehicle unenterable and unexitable until it is Unlocked.
Has Gun (Not in FGD) (EnableGun) <boolean>
If this vehicle has a mounted gun associated with it, set if it's functional or not.

Inputs[edit | edit source]

Unlock
Makes vehicle enterable and exitable.
Lock
Makes vehicle unenterable and unexitable.
TurnOff
To do: Description.
TurnOn
To do: Description.

Outputs[edit | edit source]

PlayerOn
Fires when the player enters the vehicle. Activator is that player.
PlayerOff
Fires when the player leaves the vehicle. Activator is that player.
PressedAttack
Fires when the driver presses their primary fire key (+attack).
PressedAttack2
Fires when the driver pressed their secondary fire key (+attack2).
AttackAxis <integer>
Confirm: Fires constantly? Automatically puts 0 or 1, depending on if the driver is pressing their primary fire key, as the input parameter, unless overridden by the mapper.
Attack2Axis <integer>
Confirm: Fires constantly? Automatically puts 0 or 1, depending on if the driver is pressing their secondary fire key, as the input parameter, unless overridden by the mapper.