HL2DM Vehicle Fix: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Redirect; moved)
Tag: New redirect
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{cleanup}}
#redirect [[Multiplayer_Vehicle_Fixes#HL2DM_Vehicle_Fix]]
{{moveto|Multiplayer Vehicle Fixes}}
 
HL2DM Vehicle Prediction (Partial-Fix)
After many days of research and work, I have: A working predicted vehicle!  O.k first things first:
 
 
 
= Steps =
=== Step 1 ===
Make a mod for HL2DM.
 
=== Step 2 ===
Build the code so you don't need to wait a long time once you input the new code to find errors.
 
=== Step 3 ===
Next, follow this tutorial:
 
[[Multiplayer_Vehicle_Fixes|Multiplayer Vehicle Fixes]]
 
=== Step 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 )
 
=== Step 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.
 
=== Step 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.
 
=== Step 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!

Latest revision as of 06:01, 22 April 2024