| Note: This tutorial
assumes you already have the basics of a level, ie. a hollowed box and
a player start inside it. =]
For this tutorial we'll be
creating a window that explodes when shot.
Step 1:
| Create the brush you will
use for your window. Texture it with one of the window textures and you
have your basic window. The window textures automatically make the brush
transparent so that doesn't require any additional settings. |
___
Step 2:
| Apply the Func\Explosive
entity to the window brush. There are three fields you'll want to enter
values for in its settings. The health field is used to determine
how much damage the brush can take before it explodes. I used a small value
of 10 because glass is pretty fragile. The mass field is where you
enter the brushes mass which determines how many parts it breaks into when
it explodes. Finally, enter a name in the target field for the speaker
entity we'll be creating next. |
Step 3:
| To complete the effect of
breaking glass we're going to add a speaker that will play the sound of
glass breaking when the window brush explodes. Create a Target\Speaker
entity. Goto it's properties and enter the path "world/brkglas.wav" into
the noise field. And in the targetname field enter the name
you put as the window's target. |
Notes
| The Func\Explosive entity
isn't limited to windows. You can use it on crates, pillars, walls, etc.
You can also have it do damage by entering a value into it's dmg
field. |
That's it! Go break some
glass! |