WiseWindmill: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed credits slightly)
mNo edit summary
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== HL2 Windmill ==
{{DISPLAYTITLE:WiseWindmill: HL2 windmill}}
{{SDKNuts Tutorials}}
{{wisemxport|[[User:Plykkegaard|Peter [AGHL]]] 14:57, 6 Feb 2008 (PST)}}
[[File:wiseWindmill01.jpg|thumb|300px|right|Windmill on {{ent|d2_coast_09}}. (Looks like they might have rushed this one, notice the rear vertical support goes through the rotating shaft for the windmill.)]]
==Introduction==
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.


This tutorial is moderately advanced so I’m not going to get into the basic information about using the individual entities.
==Creation==
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 {{ent|prop_physics}}.
 
*'''Name''': windmill
[[image:wiseWindmill01.jpg|thumb|150px|right|Windmill from HL2 D2_Coast_09]]
*'''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
Take a look at the screenshot of a windmill from HL2 in D2_Coast_09 to the right
''(Looks like they might have rushed this one, notice the rear vertical support goes through the rotating shaft for the windmill.)''
 
The first thing we’re going to do is insert the model for our windmill.
* Class [[prop_physics]]
 
* 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.
Once it’s in place our physics entities can be created.


The sound:
The sound ({{ent|ambient_generic}}):
* [[ambient_generic]]
*'''Name''': windmillSound
* Name: windmillSound
*'''Sound Name''': coast.windmill
* Sound Name: coast.windmill
*'''Volume''': 8.5
* Volume: 8.5
*'''SourceEntityName''': windmill
* SourceEntityName: windmill


The Motor:
The Motor ({{ent|phys_motor}}):
* [[phys_motor]]
*'''Name''': windmill_motor
* Name: windmill_motor
*'''Rotation Speed''': -90
* Rotation Speed: -90
*'''Spin up time''': 1
* Spin up time: 1
*'''System Inertia Scale''': 3.0
* System Inertia Scale: 3.0
*'''Attached Object''': windmill
* Attached Object: windmill


The Hinge:
The Hinge ({{ent|phys_hinge}}):
* [[phys_hinge]]
*'''Name''': windmill_hinge
* Name: windmill_hinge
*'''Entity 1''': windmill
* Entity 1: windmill
*'''Play Sound on Break''': physics\plastic\plastic_box_break1.wav
* 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  
The next entity isn’t normally needed but for this example I’m using a {{ent|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.
created for this tutorial, one of which will stop the motor, sound and break the hinge so when that happens I turn on our <code>phys_ballsocket</code> 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 <code>phys_ballsocket</code>. 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 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.)''
''(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.)''


* [[phys_ballsocket]]
*<code>phys_ballsocket</code>
* Entity 1: windmill
*'''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.)
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.)


[[image:wiseWindmill02.jpg|thumb|150px|right|The finall Windmill]]
[[File:wiseWindmill02.jpg|thumb|150px|right|The final Windmill]]


Here are screen shots for the flags I’ve set for each entity and shots of the trigger outputs.
Here are screen shots for the flags I’ve set for each entity and shots of the trigger outputs.
Line 63: Line 56:
</gallery>
</gallery>


There’s a lot more you can do, I hope I’ve stimulated your imagination.
==See also==
 
*[http://type3studios.com/downloads/tutorials/SdkNutsTutorials/WiseWindmill.zip Example VMF]
If you need further help please use the [http://forums.steampowered.com/forums/forumdisplay.php?f=193 forum for Source level Design]
*[https://cdn.discordapp.com/attachments/434089157875466242/462859332011294720/WiseWindmill.vmf Example VMF backup]


==== Credits ====
[[Category:Level Design]]
The tutorial is is originally created by --[[User:Mark WiseCarver|wisemx]], it is ported from [[WiseWindmill|sdknuts.net/wiseWindMill]] to the VDC by --[[User:Plykkegaard|Peter [AGHL]]] 14:57, 6 Feb 2008 (PST)

Latest revision as of 07:31, 15 April 2024


This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.

Windmill on d2_coast_09. (Looks like they might have rushed this one, notice the rear vertical support goes through the rotating shaft for the windmill.)

Introduction

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.

Creation

The first thing we’re going to do is insert the model for our windmill, a prop_physics.

  • 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 (ambient_generic):

  • Name: windmillSound
  • Sound Name: coast.windmill
  • Volume: 8.5
  • SourceEntityName: windmill

The Motor (phys_motor):

  • Name: windmill_motor
  • Rotation Speed: -90
  • Spin up time: 1
  • System Inertia Scale: 3.0
  • Attached Object: windmill

The Hinge (phys_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.)

  • phys_ballsocket
  • 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.)

The final Windmill

Here are screen shots for the flags I’ve set for each entity and shots of the trigger outputs.

See also