Counter-Strike: Source Level Creation

From Valve Developer Community
Revision as of 19:45, 28 June 2005 by Mungo (talk | contribs) (Hostage Rescue gameplay entities)

Jump to: navigation, search

Making levels for Counter-Strike: Source

This document describes the basics entities needed to make levels for Counter-Strike: Source. It assumes you already have knowledge of basic Hammer functions and CS:S gameplay. See the Hammer User's Guide for information on basic Hammer functions such as geometry creation and entity placement.

Basic CS:S entities

info_player_terrorist Start points for the terrorist team. One of these needs to be placed for each team member. 20 start points is typical. Should be placed at least 128 units apart.
info_player_counterterrorist Start points for the counter-terrorist team. One of these needs to be placed for each team member. 20 start points is typical. Should be placed at least 128 units apart.
func_buyzone Brush entity that defines the area where the team can purchase equipment. Should have the tools\toolstrigger material applied to all sides, completely cover the spawn area, and be set for the correct team.
prop_physics_multiplayer Models that have physics properties (i.e., barrels, debris, etc). Must not be intersecting any other geometry where it’s placed.
func_ladder Climbable ladder brush. Not rendered, but allows players to climb up the brush surface. Should have the tools\toolsinvisibleladder material assigned to all sides of the brush.
point_viewcontrol Point entity use for camera locations when players join the game. Should be set to look at another point entity, typically an info_target.
info_no_dynamic_shadow Point entity to stop player shadows from being applied to a particular set of brush faces. Sometimes needed when player shadows get cast on ceilings when players walk above. Open the entity properties, click the Pick… button, and then click to add a face to prevent that surface from getting shadows. Hold down CTRL to for additional faces, then click the Pick… button again when you're done.

Bomb Defusion gameplay entities

func_bombtarget Brush entity that determines where the bomb can be planted. When the bomb is planted then explodes inside the area, the BombExplode outputs are fired. The game handles all of the bomb planting and scoring logic – the BombExplode outputs are purely to add visual and damage effects.
env_explosion Point entity for explosion effects when a bomb explodes. Creates a fireball sprite effect and will also effect physics models. Can also apply damage. A single env_explosion is typically placed at the center of the bomb site, triggered from the BombExplode outputs on the func_bombtarget.
env_fire Point entity for secondary fire effects when a bomb explodes. Can also apply damage. Several env_fire entities are typically scattered around the bomb site, triggered from the BombExplode outputs on the func_bombtarget.
ambient_generic Point entity that plays a .wav sound from the entity location. Can be used to play burning fire sound after the bomb explodes.

Hostage Rescue gameplay entities

hostage_entity Point entity that is placed for each hostage to be rescued in the map. A hostage NPC will spawn at this point. There are usually four hostages placed in each hostage rescue map.
func_hostage_rescue Brush entity that defines the area where hostages are rescued. Hostages that get led into this area will be marked as rescued.
info_node Point entity used for navigation of the hostage NPCs. info_node entities need to be placed in all areas where the hostages need to move. Paths are drawn between each node point. One node needs to be visible by the next node point to connect properly. Note: This is now obsolete for hostage NPCs. Hostages now rely on the bot navigation mesh.

CS:S gameplay decals

Here is a list of some of the special materials that are used to mark gameplay areas in CS:S maps. They can be used as Decals or Overlays.

Bomb target decals decals/target
Directional decals decals/sitea

decals/siteb

decals/arrowlf

decals/arrowrt

decals/arrowuplf

decals/arrowuprt

cstrike/{sitea

cstrike/{siteb

Hostage rescue point decal decals/hrpoint

Counter-Strike Round Restarts

At the end of each Counter-Strike: Source gameplay round, when end-of-round game conditions are met, the game resets itself for the next round. When this happens, most of the entities in the map reset to their original state, just as if the map was just loaded. However, the following list of entities are not reset, and continue in the same state in the all consecutive rounds:

    * env_soundscape
    * env_soundscape_proxy
    * env_soundscape_triggerable
    * env_sprite
    * env_sun
    * env_wind
    * env_fog_controller
    * func_brush
    * func_wall
    * func_buyzone
    * func_illusionary
    * func_hostage_rescue
    * func_bomb_target
    * infodecal
    * info_projecteddecal
    * info_node
    * info_target
    * info_node_hint
    * info_player_counterterrorist
    * info_player_terrorist
    * keyframe_rope
    * move_rope
    * info_ladder
    * point_viewcontrol
    * shadow_control
    * sky_camera
    * trigger_soundscape
    * worldspawn

All other entities are reset to their original state at the beginning of the next round, and all pending outputs are cancelled.

You can use a logic_auto point entity to trigger additional events to occur at the start of the round. The OnMapSpawn output of the logic_auto will be fired when the map is first loaded, and at the beginning of the each round thereafter, after the reset. For example, in the map cs_havana, at the start of each round, a logic_auto has an OnMapSpawn output to a logic_case entity that randomly sets the routes open to the players each round. The logic_case enables and disables a series of func_wall brush entities that determines which routes are open and closed. For more information on how to use outputs, see Entity I/O.

Other important components

There are other entities and materials that are commonly used in Counter-Strike: Source maps. Here is a list of some of the most prominent ones.

trigger_multiple
trigger_once
Brush entities used to activate events, set soundscapes, etc. See the Entity Guide in the Hammer User's Guide for further details on specific entities.
filter_activator_name
filter_activator_team
Point entities that are used to determine what entities or players can activate a trigger. See the Entity Guide in the Hammer User's Guide for further details on specific entities.
Clip brushes – brushes with the tools\toolsclip material applied to all sides. Used to block off areas from players. Also blocks grenades.
Player clip brushes – brushes with the tools\toolsplayerclip material applied to all sides. Used to block off areas from players. Blocks players only – not NPCs or grenades.
Nodraw brushes – brushes with the tools\toolsnodraw material applied to all sides. Nodraw faces do not render, but the brushes still seal areas and cast shadows. Useful to put behind non-sealing geometry, such as models or displacements, to seal the map without rendering extra faces.
Water brushes – brushes with a water material applied to to the top surface. Water is created by making a brush volume and applying one of the water materials to the top surface and tools\toolsnodraw to all the other sides. See Adding Water for further details on how to create water volumes.
env_cubemap Need to be placed around the level for proper rendering of reflection/specular materials. See Cubemaps further details on how to use env_cubemap.
env_soundscape Placed within a level to trigger different DSP (echo) effects and sound settings. See Soundscapes for further details on how to use env_soundscape.