Creating a working Crane in Half-Life 2

From Valve Developer Community
Revision as of 15:35, 9 August 2010 by Darkdragon3456 (talk | contribs) (This is a tutorial to make a crane in Half Life 2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Creating a working crane.

Overview

In the Chapter Highway 17, the player has to use a crane to knock down a bridge and move their car to continue. Other metal objects like cargo containers can also be picked up and moved. We will be using the entitys prop_vehicle_crane and a phys_magnet

Tutorial

Before we build a crane, build a map; keep in mind that if the crane is the highest point you will need to give the crane about 100 units of extra room, and give plenty of room around the crane so the player can use it. Once that is done, add in a prop_static and set the world model to models/crane/crane_frame.mdl, then add another prop_static and set the world model to models/crane/crane_frame_interior.mdl and put that inside the frame. Next, create a prop_vehicle_crane and set the world model to models/crane/crane_docks.mdl, name it crane1, and set that on the frame. Now, create a phys_magnet, set its name to magnet1, set the world model to models/props_wasteland/cranemagnet01a.mdl, set its mass scale to 500 (this stops it from swinging wildly in the air, change it higher to lower its swing more,) and finally, posistion it under the cranes boom arm near the tip. If your wondering, the lines will set themselfs up and the magnet will be put in the default position when the map loads. Finally, open up the options for crane1 and set magnet entity to magnet 1.

Finishing Up

To finish up the crane, add a platform on the frame so the player can walk to the controls. Don't forget a ladder to get up. You don't have to use the crane frame, you can mount it onto any brush or prop, be creative. Add a few crates, maybe a jeep, and you are done!