Ads keep us online. Without them, we wouldn't exist. We don't have
paywalls or sell mods - we never will. But every month we have large bills
and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3
How to make vehicles
- A Tutorial for Counter-Strike 1.6
Have you ever wanted to play counter-strike with cars like the ones from Half-Life 2/Garry's Mod?... Well now you can!
The idea behind this is to model a car in Hammer that will handle like a train (func_train), but this is going to be able to move not only on the y axis but also on the x axis
[Here](http://www.gamebanana.com/maps/161105 "") is a map that I made, which is a circuit with has some cars that I made (they are a bit shitty since i do not have the right textures to make a proper one but i am sure that you will make some good ones ).
Ok lets get started:
1) This first step is the most simple because all you have to do is to model a car, but it has to be looking to the right because if not it will not work properly.
2) Now to make the game recongnise the center of gravity of the vehicle you have to create right in the center of the car a small cube (which is invisible in-game) with the texture origin (which is inside halflife.wad), to find the center of the car all that you have to do is look at the bottom of the Hammer screen the size of the car and take half the value x and y, then measure it with a selection box where is the half (maybe you have to increase the value of the grid to find the center) and then group it with the car.
3) What to do now is to convert the car (which is grouped with the cube) in func_vehicle, to do that right click on the car (not in the 3D view) and choose "Tie to Entity" and then a window pops up, then we choose func_vehicle there.
The values we need to change to the func_vehicle once converted the car are:
Name: car1 (use the name that you like but car1 is easier to use)
First stop target: ft1 (I will explain that later)
Sound: leave it at None because the sounds are annoying
Length of the vehicle: self explanatory, but if you do not know, this is just the lenght in value in x of the car, this value is taken looking from the top view (x / y).
Width of the vehicle: like the other but this is the width (the y value)
Heigh above track: this is important if you made wheels on your car (the wheels do not rotate but are of decoration) so if your car is suspended a bit on the air due to the wheels or whatever that you make, you must add the heigh above track (again self explanatory)
Speed: 512 (that is a regular speed but you can add much more if you want a turbo car)
Acceleration: 7 (that's how fast the car accelerates from 0 to 512 speed)
Damage on crush: 20 (if you hit someone, you cause him 20 damage)
Volume: 7 (that is the volume of the sounds of the car)
4) Now we have to add the controls, to achieve this we create a cube with the texture aaatriger (which is inside halflife.wad), the cube (which is invisible during the game) is the area in which you aim and press the "use" key in counter strike and an arrow appears at the bottom of the screen (as with func_train) that let you move and shows your speed.
This cube is going to be put where the controls of your car are and then convert it with Tie to Entity to func_vehiclecontrols.
Now that you made func_vehiclecontrols you see 1 value only: "Vehicle Name", put the name of the car that is car1.
5) We're near the end, what we have to do now is add 2 entities called path_track that one has to be right in front of the car aligned and at the same height as the cube with the texture origin of the second step.
The other path_track must be aligned and at the same height as the cube with the origin texture but it must be just behind the car.
Now select the path_track of the front and right click, properties:
Then a window pop up and you see some values but we will only use 2 which are:
Name: ft1 (ft stands for front)
Next stop target: bk1 and the (bk stands for back)
Now we choose the other path_track, right click it, properties:
Name: bk1 and the
Next stop target: ft1
And ready! The car is finished, now we just need to compile and test on a map.
There may be a bug that makes the car go backwards instead of forward, but is fixed by relocating both path_track.
Here some specific data:
-The path_tracks are targeted each other because that makes a loop on the movement that produces movement on the y axis.
-The size of the cube with the origin texture have to be something like 64x64
-The size of the cube tied with func_vehicle controls doesn’t matted but it must cover all the part from where you want to control de car.
-In the Damage of crush from the properties of the func_vehicle you can put 100 if you want an instant kill but you have to consider the armor too.
-When i say measure the half size in the step 2 i make you to do that because that way you can get the center of your vehicle easier.
If you have a trouble, a question or need some especific data just post a comment here or PM me!
> **Posted by MoonSlave**
> I make a driveable boat.., but it sink..
> How do i fix that??
I don't remember well, but i think it has something to do with the height of the path_track entities, so try putting them at the bottom of the water.