Creating Brush Entities: Difference between revisions
Jump to navigation
Jump to search
(otherlang2 update) |
mNo edit summary |
||
Line 14: | Line 14: | ||
== Construction == | == Construction == | ||
# Select the {{hammer block}} and create a new brush. | # Select the {{hammer block}} and create a new brush. 128×128×16 is a good size, but anything will do. {{tip|If Hammer’s grid is too large to get down to 16 units, press {{key|[}} or click '''Smaller Grid''' [[File:Hammer SmallerGrid.png|link=]] scale it down. Never disable snapping unless you really, ''really'' need to!}} | ||
# Move the brush to an entity (also known as | # Move the brush to an entity (also known as “tying” to an entity) using {{key|Ctrl+T}} or the [[Hammer New Objects Toolbar#toEntity_(Ctrl+T)|toEntity]] button:<p>[[File:Hammer toEntityButton.png|border|Hammer toEntity button|link=]]</p> | ||
# This will bring up the [[Hammer Object Properties Dialog|Object Properties]] dialog:<p>[[File:Hammer object properties.png|400px|Object properties dialog]]</p> {{tip|If you need to access the dialog again later, select your brush and press {{key|Alt+Enter}}.}} | # This will bring up the [[Hammer Object Properties Dialog|Object Properties]] dialog:<p>[[File:Hammer object properties.png|400px|Object properties dialog]]</p> {{tip|If you need to access the dialog again later, select your brush and press {{key|Alt+Enter}}.}} | ||
# Select [[func_door]] from the | # Select [[func_door]] from the “Class” drop-down menu in the top left (you can search by typing into the box) and hit “Apply”. | ||
# Near the bottom of the main | # Near the bottom of the main “Keyvalues” list, find “Move Direction”. Either change its value to read <code>-90 0 0</code> or select “Up” from the drop-down list to the left of the black circle. | ||
# Click | # Click “Apply” again, then close the Object Properties dialog. | ||
You should now be able to compile your map and see the door working. | You should now be able to compile your map and see the door working. | ||
Line 25: | Line 25: | ||
== Finishing == | == Finishing == | ||
Open the [[Hammer Texture Browser|Texture Browser]] and [[Hammer Texture Browser#Filter|filter]] for | Open the [[Hammer Texture Browser|Texture Browser]] and [[Hammer Texture Browser#Filter|filter]] for “door”. Choose a material that you like and apply it to your brush as you would normally. You might also want to build a wall that connects the door to the edges of your map. | ||
[[File:Decorated door.jpg|400px|thumb|none|But | [[File:Decorated door.jpg|400px|thumb|none|But don’t get too carried away!]] | ||
{{Navbar|Adding Point Entities|Your First Map|Adding Light}} | {{Navbar|Adding Point Entities|Your First Map|Adding Light}} | ||
[[Category:Level Design Tutorials]] | [[Category:Level Design Tutorials]] |
Revision as of 16:29, 1 May 2012
We have already created brushes. There is another side to them: the brush entity.
In this example, we will create a brush that acts as a sliding door. When the player touches the brush, it will rise into the air and allow passage.

A basic func_door entity.
Construction
- Select the Block tool
and create a new brush. 128×128×16 is a good size, but anything will do.
Tip:If Hammer’s grid is too large to get down to 16 units, press [ or click Smaller Grid
scale it down. Never disable snapping unless you really, really need to!
- Move the brush to an entity (also known as “tying” to an entity) using Ctrl+T or the toEntity button:
- This will bring up the Object Properties dialog:
Tip:If you need to access the dialog again later, select your brush and press Alt+Enter.
- Select func_door from the “Class” drop-down menu in the top left (you can search by typing into the box) and hit “Apply”.
- Near the bottom of the main “Keyvalues” list, find “Move Direction”. Either change its value to read
-90 0 0
or select “Up” from the drop-down list to the left of the black circle. - Click “Apply” again, then close the Object Properties dialog.
You should now be able to compile your map and see the door working.
Finishing
Open the Texture Browser and filter for “door”. Choose a material that you like and apply it to your brush as you would normally. You might also want to build a wall that connects the door to the edges of your map.