Cleanup is going to take awhile, so the site is back up but editing has been disabled.
Prop vehicle apc tutorial
From HalfLife 2 Knowledge Base
by mch
Creating an npc controlled apc:
The apcs in HL2 are very easy to add into a map. They can add some atmosphere to a map themed off of the single player story, even though their rockets aren't all that fearsome. Their turrets are somewhat powerful, but only really at close range. The apc actually has 2 elements, the prop_vehicle_apc and the AI controlling the apc, npc_apcdriver. You can set the relationship of the apcdriver to fight any entity you desire. Additionally, you aren't limited to just the combine apc model. The jeep works well as an apc, although it doesn't look quite as authentic when it fires rockets out of its weak little frame. The AR2 bullets fire in the wrong direction, as well. Still a useful option for maps, however.
First, make a box. Nothing fancy, just a grassy textured floor and some skybox textured walls. Don't forget a player start.
Ok, good. Now go to the entity tool and insert a prop_vehicle_apc. Open up its properties. Name it apc. Go to world model and find the model “models/combine_apc.mdl”. Or paste that in.
Now add in an npc_apcdriver, using the entity tool. It doesn't really matter where it goes. Set its properties:
Name: “apcDriver”
Vehicle to Drive: “apc”
Maxspeed: “50”
Minspeed: “25”
Play around with the max and minspeed values. 0 is 0% of the apc's maximum speed, and 100 is 100%. Note, however, that the npc_apcdriver can just decide he only wants to go the minumum speed sometimes, and so he just stops, so make sure minspeed is set to the absolute slowest you ever want the apc to go. 0 is not recommended, as you can always use the inputs to the apcdriver “Stop” and “StartForward” if you want him to stop for some reason.
Now go to flags. We'll only change Long Visibility/Shoot to checked, so it can see you from farther away.
Now we need to make a few path_corners so the apc knows where to go. Go the the entity tool and find path_corner. Make the first one (put it near the front end of the combine apc), and name it apc_path_0.
Now, grab apc_path_0 in the top view, hold down shift (doing this will create a copy named apc_path_1 wherever you set it down) and drop it a bit north of the original. Holding shift while dragging path_corners or path_tracks adds 1 to the last bit of the name, so path_corner_0 would be copied and renamed path_corner_1, path_corner_1 would be copied and renamed path_corner_2, and so on. Repeat drag/copy until you make a nice circle. On the final path_corner, you will need to go the properties and set “Next Stop Target” to “apc_path_0”.
Now go to the apcDriver's properties and set “Target path corner” to “apc_path_0”. Now, we need one final major addition. The npc_apcdriver knows where he's supposed to go via the path_corners, but still doesn't have a node network to actually figure out how to get there. Go to the entity tool and select info_node. In the camera view, start clicking along the intended path and littering the ground with info_nodes. If the apc ever goes out of range of the node network, it won't know what to do, and will not attempt to navigate around the map at all. It will just sit in place.
An npc_apcdriver tries to come very close to the path_corners, and at maximum speed has a pretty large turn radius. If he overshoots a path_corner, he may back up and try to run it over before continuing on to the next stop. So if you want a tighter turn, set his max speed lower. To do this, go to one of the path_corners. Add an output that looks like the following:
But now you want the apc to go a bit faster on a straight stretch, so you need to set his max speed back up. After that turn, choose one of the path_corners that begin a straight stretch and add an output that looks like the following:
You'll want to experiment with the size of your path, how many corners you have, and how many nodes you have helping him along. You don't need the ground covered, just a good few for him to follow. As a general rule, try to put as few info_nodes down as possible. But remember, the apc will just stop if he gets too far away from the nodes.
Now, play around in your own map with obstacles and things. The apc will work sporadically in multiplayer, but leave a glowing red dot on the ground wherever the center of the apc happened to be. Sometimes you have to shoot the apc in multiplayer so it begins moving.



