Creating a working Crane in Half-Life 2
Creating a working crane as seen in Half Life 2.
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 and barrels can also be picked up with the magnet and moved. The crane is simple, but for begining mappers, making one can be a challenge. We will be using the entities prop_vehicle_crane and a phys_magnet.
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, position it under the crane's boom arm near the tip.
If you're wondering, the lines will automatically be set up and the magnet will be put in the default position when the map loads. Finally, open up the properties for crane1 and set magnet entity to magnet 1.
To finish up the crane, add a platform on the frame so the player can walk to the controls. Don't forget to put a ladder so the player can get up. You don't have to use the crane frame, and you can mount it onto any brush or prop. So be creative. Add a few crates, maybe a jeep, and you are done!