Glass

- By Raeven0
This tutorial was last updated on Apr 12, 2005.

UNBREAKABLE


Unbreakable glass consists of a block with at least one face using the tools/toolsnodraw texture. The following block would be two-sided glass, because two of its faces use a glass texture.

   


I used the texture glass/glasswindowbreak070a. To cover the side faces with nodraw, click the Texture Application Tool icon , then click Browse from the Texture Application Tool dialogue box. Choose the tools/toolsnodraw texture (it should be yellow and have NODRAW written on it), then right-click the side faces of the glass block.

You can move your mouse to the Camera view (not the Camera Tool icon, just the Camera view) and use the W/A/S/D keys to move, and the arrow keys to turn. This allows you to fly around the glass and apply the texture to faces you couldn't see before.

When you have a glass block (most mappers prefer a thin glass block, because real glass is rarely thick), you can put a wall or some other pretty thing around it:



Note that this is the same square glass block, just with a wall around it. Glass is allowed to cut into the blocks around it.

BREAKABLE


To make glass that can be broken, first make a block of unbreakable glass (see above). Then, select the glass, and press CTRL-T. This turns the unbreakable glass block into an entity, allowing it to do things besides sit there. (Normal blocks can't do anything but sit there. Entities can move, break, fall on you, etc.)

From the entity's Classname menu, choose func_breakable. This makes the block a func_breakable entity, allowing it to be broken and giving it some other cool functions.

You can select the Strength property to change the health of the glass.



SHATTERABLE


To make glass that can be shattered, like this:



First, take your Breakable glass block and make it very very thin. As thin as possible (which is one unit thick). Second, use the Texture Application Tool as described above to cover all but one side with nodraw.

Now, instead of func_breakable (see Breakable glass), make the block a func_breakable_surf entity.

The func_breakable_surf entity will take the one glass-textured face (this is why all faces but one should be nodraw) and turn it into a two-sided shatterable plane. The func_breakable_surf has to be very thin because every part of it will still be solid, even though only one face is used!

TADA, GLASS!


DOWNLOAD EXAMPLE MAP (48KB)



Still need help? Ask your questions in one of our HELP FORUMS
Post A Comment
Name:
Email: Links Not Allowed In Comments
Comment:
What is the capital of France? Need Help?
Comments
Steve - Jan 10, 2008
Should just point out that if you don't want to make a breakable glass that you should make it an entity if its intersecting as in your example.
Atreides - Jan 7, 2008
How do you make it respawn? There isn't a respawn perimeter on the glass.
Jimbob - Oct 3, 2007
Thanks a bunch, i love this website
All original content ©2006 EditLife.net. All Rights reserved. All files property of their rightful owners.
Get Firefox! Get Thunderbird! Get Notepad++!