HL2DM Vehicle Fix

From Valve Developer Community
Revision as of 21:00, 16 December 2007 by CommanderGiggles (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
HL2DM Vehicle Prediction (Partial-Fix)

After many days of research and work, I have: A working predicted vehicle! O.k first things first:

1. Make a mod for HL2DM.

2. Build the code so you don't need to wait a long time once you input the new code to find errors.

3. Next, follow this tutorial:

http://developer.valvesoftware.com/w..._Vehicle_Fixes

4. Compile and fix any errors. (Right now your vehicles are predicted BUT the camera does not work, so now we are going to fix this )

5. Open hammer using your mod and create a prop_vehicle_jeep or airboat. If you use the jeep make sure you assign the "buggy" model to it or else its just a red cube O.o. Next name the vehicle.

6. Make a point_viewcontrol and move it to where you would like the camera to be when your are in the vehicle. Name it, and parent it to the vehicle. (Do NOT assign a "entity to look at" or else it will not work). Next set the flags "Infinate hold time" and "Interruptable by player" and un-check all the others.

7. Next go back to the vehicle and open the "output" tab. Create a new output and set it as the following:

My output named: PlayerOn Target entity: "camera name" Via this input: enable

Create another and make it:

My output named: PlayerOff Target entity: "camera name" Via this input: disable

  • Optional*

Group the vehicle and camera and move then to the center of grids, then make into a prefab so you can spawn them easily

You know have a working vehicle to use in MP! For multiple vehicles in a level you need to make the names different such as add numbers to the names. I hope this will help you in the future who like me ran into this problem while making a mod. Im sure if other coders helped make a code for a built in camera this would be very helpful!