WiseWindmill: HL2 windmill
This tutorial was originally created by wisemx.
Ported from SDKnuts.net to VDC by: Peter [AGHL] 14:57, 6 Feb 2008 (PST)
This tutorial is moderately advanced so I’m not going to get into the basic information about using the individual entities. If you have any questions at all please use the contact page or the forums.
The first thing we’re going to do is insert the model for our windmill, a
- Name: windmill
- Pitch Yaw Roll: Change the middle number for the angle you want, i.e. 0 270 0
- World Model: models\props_citizen_tech\windmill_blade002a.mdl
Once it’s in place our physics entities can be created.
The sound (
- Name: windmillSound
- Sound Name: coast.windmill
- Volume: 8.5
- SourceEntityName: windmill
The Motor (
- Name: windmill_motor
- Rotation Speed: -90
- Spin up time: 1
- System Inertia Scale: 3.0
- Attached Object: windmill
The Hinge (
- Name: windmill_hinge
- Entity 1: windmill
- Play Sound on Break: physics\plastic\plastic_box_break1.wav
The next entity isn’t normally needed but for this example I’m using a
phys_ballsocket for effect. There are two triggers that I
created for this tutorial, one of which will stop the motor, sound and break the hinge so when that happens I turn on our
phys_ballsocket to hold the windmill in place at the most obvious end joint. It will appear to break, the sound will stop and it will drop at one end. The second trigger will reinstate everything and turn off our
phys_ballsocket. This works very well and once you play around with it you should be able to come up with some very interesting scenarios.
(For example take the horse statue from HL2 and create a ballerina stand for it, spin the horse and when a force hits it the horse falls over and then ropes can be seen under the horse. The ropes stretch with the horse and give the appearance of puppet strings. Eventually another trigger is used to snap the horse back into place and once in place it will begin to spin again.)
- Entity 1: windmill
Now place and setup each of these. Use the helpers to create the handles/direction for each. (This part may take some time to get the felling for but it’s really very simple.)
Here are screen shots for the flags I’ve set for each entity and shots of the trigger outputs.