Entity creation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (made the "tips" look the same with the little bulb icon)
(cleanup)
Line 1: Line 1:
[[Category:Level Design]]
Entities give life to your level. They are the monsters, doors, switches and lights that turn your static architecture into an interactive environment. Careful use of entities is critical to creating an interesting, unique and fun level for others to play.
Entities give life to your level. They are the monsters, doors, switches and lights that turn your static architecture into an interactive environment. Careful use of entities is critical to creating an interesting, unique and fun level for others to play.


Line 6: Line 5:
There are two types of entities: ''point''-based and ''brush''-based.
There are two types of entities: ''point''-based and ''brush''-based.


Point-based entities exist only at a certain exact point. Examples include lights, monsters, and player start points. (Monsters <i>do</i> have an area, but it is defined by the game code and is not modifiable from within the map.) Some point type entities are just that: points. For example, the [[env_beam]] entity, which controls beam effects, uses two [[info_target]] entities as targets and the beam of light runs between these two points.
Point-based entities exist only at a certain exact point. Examples include lights, monsters, and player start points. Monsters <i>do</i> have an area, but it is defined by the game code and is not modifiable from within the map. Some point type entities are just that - points. For example, the [[env_beam]] entity, which controls beam effects, uses two [[info_target]] entities as targets and the beam of light runs between these two points.


Brush-based entities are entities that depend on either a [[brush]] for their physical presence (like platforms, trains, and other moving entities) or an "area" (like triggers, which require an activation field).
Brush-based entities are entities that depend on either a [[brush]] for their physical presence (like platforms, trains, and other moving entities) or an "area" (like triggers, which require an activation field).


==Point-based entity placement==
== Point-based entity placement ==
[[Image:Hammer_newentity.png|frame|right|Select an entity to place using the New Objects toolbar.]]
[[Image:Hammer_newentity.png|frame|right|Select an entity to place using the New Objects toolbar.]]
Placement of point entities is simple:
Placement of point entities is simple:


# Select the [[Hammer Entity Tool|Entity Tool]].
# Select the [[Hammer Entity Tool|Entity Tool]].
# From the [[Hammer New Objects Toolbar|New Objects toolbar]], select the entity you want from the '''Objects''' selection box. {{Note|The entity list in the '''New Objects''' dialog is for point-based entities only. For information on brush-based entities, please refer to the [[#Brush-based entity creation|next section]].}}
# From the [[Hammer New Objects Toolbar|New Objects toolbar]], select the entity you want from the "Objects" selection box. {{Note|The entity list in the "New Objects" dialog is for point-based entities only. For information on brush-based entities, please refer to the [[#Brush-based entity creation|next section]].}}
# Click in a 2D window, then position the entity cursor with the mouse. You can also click on a brush surface in the 3D view, and the point entity will be created there.
# Click in a 2D window, then position the entity cursor with the mouse. You can also click on a brush surface in the 3D view, and the point entity will be created there.
# Pressing ENTER will create the entity.
# Pressing ENTER will create the entity.
Line 21: Line 20:
# Choose Properties under the [[Hammer Edit Menu|Edit menu]] if you wish to edit the entity parameters.
# Choose Properties under the [[Hammer Edit Menu|Edit menu]] if you wish to edit the entity parameters.


{{tip|You can also use the shortcut ALT+ENTER to open the [[Hammer Object Properties Dialog|Object Properties]] dialog box for the current selection.}}
{{tip|You can also use the shortcut <code>Alt+Enter</code> to open the [[Hammer Object Properties Dialog|Object Properties]] dialog box for the current selection.}}


==Brush-based entity creation==
== Brush-based entity creation ==
[[Image:Hammer_objectproperties1.jpg|thumb|right|Select an entity for the solid from the Class list in Object Properties.]]
[[Image:Hammer_objectproperties1.jpg|thumb|right|Select an entity for the solid from the Class list in Object Properties.]]
Brush-based entities are a bit more complicated than point-based entities, but should not pose any difficulties once you know their basics.
Brush-based entities are a bit more complicated than point-based entities, but should not pose any difficulties once you know their basics.


# Create a [[brush]] where you would like it. You can use as many brushes as you'd like when building a brush-based entity.
# Create a brush where you would like it. You can use as many brushes as you'd like when building a brush-based entity.
# Select the entire object.
# Select the entire object.
# Select Tie to Entity from the '''Tools''' menu, or Press the CTRL+T hotkey. This will turn the selected objects into a brush based entity.
# Select Tie to Entity command from the "Tools" menu, or press the <code>Ctrl+T</code> shortcut. This will turn the selected objects into a brush based entity.
# In the [[Hammer Object Properties Dialog|Object Properties]] dialog, select the appropriate entity from the '''Class''' list box. Once the entity type is selected, you can modify the entity properties as needed.
# In the Object Properties dialog, select the appropriate entity from the "Class" list box. Once the entity type is selected, you can modify the entity properties as needed.


{{tip|You can bring up the '''Object Properties''' for a brush-based entity the same way you do for a point-based entity: select it and press ALT+ENTER.}}
{{tip|You can access the Object Properties dialog for a brush-based entity the same way you do for a point-based entity: select it and press <code>Alt+Enter</code>.}}


You will notice that brush-based entities appear as a different color in the 2D windows, typically purple.<br style="clear:both">
You will notice that brush-based entities appear as a different color in the 2D windows, typically purple.{{clr}}
 
==Combining Solid Entities==


== Combining solid entities ==
Multiple solid entities can be also combined into a single entity:
Multiple solid entities can be also combined into a single entity:


# Select the entities or brushes you wish to combine.
# Select the entities or brushes you wish to combine.
# Select Tie to Entity from the [[Hammer Tools Menu|Tools Menu]], or press CTRL+T.
# Select Tie to Entity from the [[Hammer Tools Menu|Tools Menu]], or press <code>Ctrl+T</code>.
# A dialog will open with a list of entities in the current selection. Choose which of the entities you wish to keep for the final, combined entity. Select one of the entities, and that entity will also be highlighted in the 2D and 3D Views. Click '''OK''' to confirm your choice.
# A dialog will open with a list of entities in the current selection. Choose which of the entities you wish to keep for the final, combined entity. Select one of the entities, and that entity will also be highlighted in the 2D and 3D Views. Click "OK" to confirm your choice.
# The [[Hammer Object Properties Dialog|Object Properties]] dialog will appear, allowing you to change the parameters for the combined entity.
# The Object Properties dialog will appear, allowing you to change the parameters for the combined entity.
 
==Using Entities==
 
Once an entity has been made, it can be controlled through the Entity I/O system. This system controls how entities interact with each other to make the game. See [[Inputs and Outputs]] for more information.


==See Also==
== Using entities ==
Once an entity has been made, it can be controlled through the Entity I/O system. This system controls how entities interact with each other to make the game.


== See also ==
* [[Brush Creation]]
* [[Brush Creation]]
* [[Inputs and Outputs]]
* [[Inputs and Outputs]]
Line 58: Line 54:
{{otherlang:en}}
{{otherlang:en}}
{{otherlang:en:jp|Creating Entities:jp}}
{{otherlang:en:jp|Creating Entities:jp}}
[[Category:Level Design]]

Revision as of 15:00, 1 December 2007

Entities give life to your level. They are the monsters, doors, switches and lights that turn your static architecture into an interactive environment. Careful use of entities is critical to creating an interesting, unique and fun level for others to play.

Unlike solids, entities are not created within Hammer. Most users will simply choose from a pre-existing set of entities provided. Once you have selected the appropriate entity, Hammer gives you control over its placement and other properties.

There are two types of entities: point-based and brush-based.

Point-based entities exist only at a certain exact point. Examples include lights, monsters, and player start points. Monsters do have an area, but it is defined by the game code and is not modifiable from within the map. Some point type entities are just that - points. For example, the env_beam entity, which controls beam effects, uses two info_target entities as targets and the beam of light runs between these two points.

Brush-based entities are entities that depend on either a brush for their physical presence (like platforms, trains, and other moving entities) or an "area" (like triggers, which require an activation field).

Point-based entity placement

Select an entity to place using the New Objects toolbar.

Placement of point entities is simple:

  1. Select the Entity Tool.
  2. From the New Objects toolbar, select the entity you want from the "Objects" selection box.
    Note.pngNote:The entity list in the "New Objects" dialog is for point-based entities only. For information on brush-based entities, please refer to the next section.
  3. Click in a 2D window, then position the entity cursor with the mouse. You can also click on a brush surface in the 3D view, and the point entity will be created there.
  4. Pressing ENTER will create the entity.
  5. Fine tune the entity position in the 2D and 3D views.
  6. Choose Properties under the Edit menu if you wish to edit the entity parameters.
Tip.pngTip:You can also use the shortcut Alt+Enter to open the Object Properties dialog box for the current selection.

Brush-based entity creation

Select an entity for the solid from the Class list in Object Properties.

Brush-based entities are a bit more complicated than point-based entities, but should not pose any difficulties once you know their basics.

  1. Create a brush where you would like it. You can use as many brushes as you'd like when building a brush-based entity.
  2. Select the entire object.
  3. Select Tie to Entity command from the "Tools" menu, or press the Ctrl+T shortcut. This will turn the selected objects into a brush based entity.
  4. In the Object Properties dialog, select the appropriate entity from the "Class" list box. Once the entity type is selected, you can modify the entity properties as needed.
Tip.pngTip:You can access the Object Properties dialog for a brush-based entity the same way you do for a point-based entity: select it and press Alt+Enter.

You will notice that brush-based entities appear as a different color in the 2D windows, typically purple.

Combining solid entities

Multiple solid entities can be also combined into a single entity:

  1. Select the entities or brushes you wish to combine.
  2. Select Tie to Entity from the Tools Menu, or press Ctrl+T.
  3. A dialog will open with a list of entities in the current selection. Choose which of the entities you wish to keep for the final, combined entity. Select one of the entities, and that entity will also be highlighted in the 2D and 3D Views. Click "OK" to confirm your choice.
  4. The Object Properties dialog will appear, allowing you to change the parameters for the combined entity.

Using entities

Once an entity has been made, it can be controlled through the Entity I/O system. This system controls how entities interact with each other to make the game.

See also

Template:Otherlang:en Template:Otherlang:en:jp