2Bit's Mapping Corner on www.PythonOnline.co.uk
ET Mapping Tutorial

Lesson 7

Topics

Making a destructible window
 
Making an opening for the window
Making a window
Back to main menu
Making an opening for the window [Top]
From this point on I am assuming you know how to create, resize and edit brushes with the clipper tool and edge tool (in the 2D), and that you know how to select and texture multiple faces (in the 3D).  Also that by default you will apply caulk to any new brush unless directed otherwise.
Run Radiant.  Open the tutorial map.  Select the environment ceiling and Hide it.  Select the roof over where we will put the window (see the picture below) and Hide it too.

Press 5 for the grid scale.  In the 2D, select the wall that we will put a window in.

Press X (for the clipper) and click at spots 1 and 2:

Press shift+return (to cut the brush) then shift+click on the smaller chunk to deselect it.

The clipper tool remains active, so click at 1 and 2...

...and press shift+return again.  Shift+click on the smaller chunk to deselect it.

Ctrl+tab (twice is clearer) to get a side view.  Click on 1 and 2...

...and press shift+return again.  Shift+click on the smaller chunk to deselect it.

Then click at 1 and 2 as shown below to complete the cutting out.

 If the smaller chunk is not yellow, press ctrl+return to make it yellow.

Press return to eliminate the chunk that forms the window space.

Press ESC twice to turn everything off.  (The green lines shown below are indicators I added, explained next.)

So we have the window opening.

Really we should now do one of two things for best performance: either put in a window frame, or cut up the side walls to prevent textures getting drawn behind an obscuring brush (as indicated by the green lines).

To move along more quickly we'll do the quick and dirty - which is especially ok if the current map area that the players are in has plenty of FPS slack.

Select all the caulked window ledge faces and give them a wooden or other texture, say like plaster.  I'm using town_c61a which has a texture that doesn't need aligning.  If you choose a wooden texture, you'll probably need to rotate the alignment for 2 of them, like you did in the door frame.

Press ESC.

Making a window [Top]
Ctrl+tab to get the overhead view, then press 3 for the small grid scale.  Draw a brush as shown:

Reminder: caulk it.

Ctrl+tab, and move the window brush into place on the ledge, and resize it to fill the whole opening.

Press ESC.  Select one of the two visible window faces.  Apply Textures/sfx tramglass2.

Press ESC.  Then select the window brush, and in the 2D, right-click and select func\func_explosive.

Press N - close the entity window and press N again!

Tick the Useshader box.  This means when the window is destroyed, the game engine will make the shards out of the same texture as the destroyed item.  If you don't, the game engine will use a default texture.

Enter "health" as a key and say "10" as the value, then press return.  The bigger the health value, the tougher the glass.  You could even use a value of 1 to guarantee the slightest damage will destroy the glass.

Enter "type" as a key and "glass" as the value, then press return.

Close the entities window and press ESC.

Press ctrl+tab twice to get the overhead view.  Press 8 to get a big grid scale.

Just for fun, right click on the grid intersection where circled in the picture.

Select misc\misc_MG42.

Ctrl+tab to see the side view.  Press 4 and drag the red box (which represents a fixed MG42) up until it stands on the floor.

Press ESC.  Save the work, compile it and go break that window soldier!

When testing you often want to restart the map quickly, say so you can rebreak your glass.  Bring up the console and type:
  \map_restart
Next lesson