Vehicle commands
 
Specific commands which control vehicles_* type entities. Vehicle entities are a subclass of scriptslave entities, they also responds to many entity, trigger and scriptslave commands (gameX86 source code reference: vehicle.cpp).

Specific entity commands are colored in brown in my custom SinScript syntax coloring wordfile for UltraEdit32.


canjump  
 
Function
 
This gives a drivable vehicle the ability to jump while the player is riding it.

Syntax
 
$<vehicle_name> canjump

Notes & examples
 
The ATV (vehicles_atv) can jump by default, the other drivable vehicles cannot. Jumping height is proportional to vehiclespeed. Please note that this command is irreversible since it has no opposite command.


drivable  
 
Function
 
This makes a vehicle drivable. Does not work for all vehicles, see notes below.

Syntax
 
$<vehicle_name> drivable

Notes & examples
 
There are some vehicles that cannot be made drivable even if you use this command like the HC Boat and Lamprey helicopters for example. For ample details and examples, please refer to the vehicles_* entity docs. This command is really meant as a way to make a basically drivable vehicle previously made undrivable with the undrivable command drivable again.


driveranim  
 
Function
 
This sets the animation to assign to the player when he is riding the vehicle. The anim name must be in the player's list of animations in the player model's .def file.

Syntax
 
$<vehicle_name> driveranim <anim_name>

Notes & examples
 
The default animation is drive. All player models and some actor models have a drive animation which is basically a static sitting, hands extended out position. Not much reason to change this.


lock  
 
Function
 
This locks a vehicle. When a vehicle is locked, it can be entered when used but it can't be exited until an unlock command is issued.

Syntax
 
$<vehicle_name> lock

Notes & examples
 
This might be useful in a situation where you want to force the player to play a certain portion of the map or the entire map on a vehicle because the mission or type of gameplay requires it.

Note:
Do not confuse this command with the lock Door command. It is an entirely different command with a different function even though it has the same name.



setweapon  
 
Function
 
This sets the weapon to give to the player when he enters the vehicle. When the player gets off the vehicle, he loses the weapon.

Syntax
 
$<vehicle_name> setweapon <weapon_name>

Notes & examples
 
Normally, when a player enters a vehicle, his current weapon is hidden from his view. But when a weapon is assigned to a vehicle with this command, it will always be visible in the player's view.

The <weapon_name> argument must be a valid weapon name. For a complete list of all weapon names, refer to the notes of the weapon Sentient command.


showweapon  
 
Function
 
This makes the player's current weapon remain visible while he's riding the vehicle.

Syntax
 
$<vehicle_name> showweapon

Notes & examples
 
Normally, when a player enters a vehicle, his current weapon is hidden from his view. This command does apply to a weapon assigned to a vehicle with the setweapon command since that weapon will always be visible in the player's view anyway.


steerinplace  
 
Function
 
This gives a vehicle the ability to steer in place while the player is riding it.

Syntax
 
$<vehicle_name> steerinplace

Notes & examples
 
The ability to steer in place means that you don't have to be moving forward or backward to be able to steer the vehicle. Please note that this command is irreversible since it has no opposite command.

The ATV (vehicles_atv) and Forklift (vehicles_forklift) can steer in place by default. The Bulldozer (vehicles_bulldozer) cannot so this is pretty much the only vehicle to which this command really applies since the remaining vehicles apart from those mentionned here are not really drivable.


turnrate  
 
Function
 
This sets the turning rate of a drivable vehicle.

Syntax
 
$<vehicle_name> turnrate <value>

Notes & examples
 
The turning rate of a vehicle determines how fast you can steer while riding it. The normal default value is 40 for all drivable vehicles. The higher the value, the faster the vehicle will turn.


undrivable  
 
Function
 
This makes a vehicle undrivable. Does not apply to all vehicles, see notes below.

Syntax
 
$<vehicle_name> undrivable

Notes & examples
 
This command does not apply to vehicles like the HC Boat and Lamprey helicopters because those cannot be made drivable anyway. For ample details and examples, please refer to the vehicles_* entity docs. This command is really meant as a way to make a basically drivable vehicle temporarily or permanently undrivable. You can make a vehicle drivable again by using the drivable command.


unlock  
 
Function
 
This unlocks a vehicle previously locked with the lock command. When a vehicle is unlocked, it can be entered and exited normally. This is a drivable vehicle's default normal mode.

Syntax
 
$<vehicle_name> unlock

Notes & examples
 
Note:
Do not confuse this command with the unlock Door command. It is an entirely different command with a different function even though it has the same name.



vehiclespeed  
 
Function
 
This sets the maximum speed at which a vehicle can go while the player is riding it.

Syntax
 
$<vehicle_name> vehiclespeed <value>

Notes & examples
 
The higher the value, the faster the vehicle will go. Also, the faster a vehicle can go, the higher it will jump if the vehicle has jumping capability. A drivable vehicle can be given jumping capability with the canjump command.