An entity introduced to Counter-Strike back in 2000, and recently in Half-Life in 2023 for its 25th anniversary. Combined with
func_vehiclecontrols
, it creates a player-controlled driveable vehicle. Quite buggy, but it serves its purpose if set up right.
As mentioned above, this entity was added in the 25th anniversary update from November 2023.
This means that this entity will not spawn if the map is running of an older version of Half-Life (a warning in the console will be shown), or a mod based on the Half-Life SDK at the moment.
Attributes
- Name (targetname) - Property used to identify entities.
- Render FX (renderfx) - Gives objects special render effects. Think of it as modifying whatever the Render Mode puts out. The options are as follows:
- 0 = Normal
- 1 = Slow Pulse
- 2 = Fast Pulse
- 3 = Slow Wide Pulse
- 4 = Fast Wide Pulse
- 5 = Slow Fade Away
- 6 = Fast Fade Away
- 7 = Slow Become Solid
- 8 = Fast Become Solid
- 9 = Slow Strobe
- 10 = Fast Strobe
- 11 = Faster Strobe
- 12 = Slow Flicker
- 13 = Fast Flicker
- 14 = Constant Glow
- 15 = Distort
- 16 = Hologram (Distort and Fade)
- Render Mode (rendermode) - Controls the type of rendering that is used for an object. Options are:
- 0 = Normal
- 1 = Color
- 2 = Texture
- 3 = Glow
- 4 = Solid
- 5 = Additive
- FX Amount (renderamt) - If Render Mode is not set to Normal, this defines how transparent the object is (0 - invisible; 255 - fully visible)
- FX Color (rendercolor) - If Render Mode is set to Color - this defines in what color the object will be filled.
- First Stop Target (target) - Name of the
path_track
used to align the vehicle (consult tutorial).
- Sound (sounds) - Choose from a list of sounds for your vehicle to emit when moving/idle:
- 0 = None
- 1 = Car 1
- 2 = Car 2
- 3 = Truck 1
- 4 = Truck 2
- 5 = Boat 1
- 6 = Boat 2
- Length of the vehicle (length) - Length of your vehicle. Controls handling (the longer the car - the harder to steer)
- Width of the vehicle (width) - Width of your vehicle. Controls X Axis tilt when making turns.
- Height above track (height) - Defines where the vehicle will collide with ground (0 = at center of origin brush)
- Initial speed (startspeed) - Vehicle starts moving at this speed.
- Speed (speed) - Maximum speed (0-2000; 2000 is the global speed limit in the game)
- Acceleration (integer) - How fast the vehicle accelerates in no defined unit (1-10)
- Damage on crush (dmg) - If the player or any damageable entity is caught between the vehicle and a solid brush, this is the amount of damage it will sustain.
- Volume (volume) - Defines how loud the vehicle sounds will be (0-10)
- Bank angle on turns (bank) - This is the angle the vehicle will tilt when cornering.
- Minimum Light Level (_minlight)
Flags
- No Pitch(X-Rot) (1) - Vehicle will not tilt when cornering.
- No User Control (2) - Players will not be allowed to control the vehicle.
- Passable (8) - Makes object non-solid.
Notes
- Just like a
func_tracktrain
, a func_vehicle
needs an origin brush.
- On spawn, the
func_vehicle
is moved to its first path_track
(First Stop Target), facing the second path_track
.
- Having the origin at zero height tends to get the vehicle swallowed into the ground on upward slopes. Raise it up to, say, around the level of the axles, and set the height value appropriately.
- Vehicle sound is currently bugged.
- The only official maps to use func_vehicle were de_jeepathon2k, which was only included in beta 7.0 and beta 7.1, and cs_siege. A drivable vehicle was added to Siege in beta 7.1, but was removed in a later version.
- Examples of custom maps with func_vehicle: de_racetownz with cars, air_fight2 with helicopters, and cc_boathouse with boats.
- Tayl0r at Counter-Map has written a tutorial.