Nav Mesh/Console commands: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Sort commands into headers based on the Game.)
(→‎{{source|4}}: Made tables sortable.)
Line 7: Line 7:


==== Mesh generation ====
==== Mesh generation ====
{| class="wikitable"
{| class="wikitable sortable"
|-
|-
! Command !! Description
! Command
! class=unsortable | Description
|- id="nav_mark_walkable"
|- id="nav_mark_walkable"
| nav_mark_walkable || Mark the current location as a walkable position. These positions are used as seed locations when sampling the map to generate a Navigation Mesh.
| nav_mark_walkable || Mark the current location as a walkable position. These positions are used as seed locations when sampling the map to generate a Navigation Mesh.
Line 32: Line 33:


==== Selection commands ====
==== Selection commands ====
{| class="wikitable"
{| class="wikitable sortable"
|-
|-
! Command !! Description
! Command !
! class=unsortable | Description
|- id="nav_add_to_selected_set"
|- id="nav_add_to_selected_set"
| nav_add_to_selected_set || Add current area to the selected set. Usually the area selected is the one pointed at.
| nav_add_to_selected_set || Add current area to the selected set. Usually the area selected is the one pointed at.
Line 66: Line 68:


==== Editing commands ====
==== Editing commands ====
{| class="wikitable"
{| class="wikitable sortable"
|-
|-
! Command !! Description
! Command
! class=unsortable | Description
|- id="nav_delete"
|- id="nav_delete"
| nav_delete || Deletes the currently highlighted or marked area, or selected set.
| nav_delete || Deletes the currently highlighted or marked area, or selected set.
Line 128: Line 131:
Attributes modify the nav area with commands that modify NPC behavior, such as a forced crouch, following a specific path, disallowing spawn, etc. Many attributes also have their own command, such as nav_crouch. The command "mark CROUCH" is the same as the command nav_crouch.<br>
Attributes modify the nav area with commands that modify NPC behavior, such as a forced crouch, following a specific path, disallowing spawn, etc. Many attributes also have their own command, such as nav_crouch. The command "mark CROUCH" is the same as the command nav_crouch.<br>
[[Navigation_Meshes_(L4D)|Attributes]].
[[Navigation_Meshes_(L4D)|Attributes]].
{| class="wikitable"
{| class="wikitable sortable"
|-
|-
! Command !! Description
! Command
! class=unsortable | Description
|- id="nav_mark_attribute"
|- id="nav_mark_attribute"
| mark '''<Attribute>'''<br>nav_mark_attribute '''<Attribute>''' || Marks the area with an attribute, such as CROUCH, PRECISE, NO_MOBS, etc.  
| mark '''<Attribute>'''<br>nav_mark_attribute '''<Attribute>''' || Marks the area with an attribute, such as CROUCH, PRECISE, NO_MOBS, etc.  
Line 176: Line 180:


==== [[Nav Mesh Editing#Place Names|Place name]] commands ====
==== [[Nav Mesh Editing#Place Names|Place name]] commands ====
{| class="wikitable"
{| class="wikitable sortable"
|-
|-
! Command !! Description
! Command
! class=unsortable | Description
|- id="nav_toggle_place_mode"
|- id="nav_toggle_place_mode"
| nav_toggle_place_mode || Toggle the editor into and out of place mode. Place mode allows the labelling of nav areas with place names.
| nav_toggle_place_mode || Toggle the editor into and out of place mode. Place mode allows the labelling of nav areas with place names.
Line 200: Line 205:


==== Other commands ====
==== Other commands ====
{| class="wikitable"
{| class="wikitable sortable"
|-
|-
! Command !! Description
! Command
! class=unsortable | Description
|- id="nav_check_file_consistency"
|- id="nav_check_file_consistency"
| nav_check_file_consistency || Scans the maps directory and reports any missing/out-of-date navigation files.
| nav_check_file_consistency || Scans the maps directory and reports any missing/out-of-date navigation files.
Line 246: Line 252:


====Additional Console Variables====
====Additional Console Variables====
{| class="wikitable"
{| class="wikitable sortable"
|-
|-
! Command !! Description
! Command
! class=unsortable | Description
|- id="nav_area_bgcolor"
|- id="nav_area_bgcolor"
| nav_area_bgcolor '''<R G B A>''' || RGBA color to draw as the background color for nav areas while editing.
| nav_area_bgcolor '''<R G B A>''' || RGBA color to draw as the background color for nav areas while editing.

Revision as of 20:40, 26 April 2023

English (en)Esperanto (eo)日本語 (ja)中文 (zh)Translate (Translate)
Nav Mesh

Commands

These commands can be bound to a key in a config file for faster workflow. For example, Left 4 Dead (L4D) has nav_mode.cfg.

Source Source

Mesh generation

Command Description

Selection commands

Command ! Description
select_with_attribute Selects/highlights all nav mesh areas marked with one attribute specified.

Editing commands

Command Description

Attribute Modification Commands

Attributes modify the nav area with commands that modify NPC behavior, such as a forced crouch, following a specific path, disallowing spawn, etc. Many attributes also have their own command, such as nav_crouch. The command "mark CROUCH" is the same as the command nav_crouch.
Attributes.

Command Description
clear_attribute <Attribute> Clears attribute specified. If nav_clear_attribute does not work to clear an attribute specified, such as PLAYER_START, this command might work.
wipe_attributes Clears all attributes on the selected part of the nav mesh.
wipe_nav_attributes Clears all nav attributes on the selected part of the nav mesh.

Place name commands

Command Description

Other commands

Command Description
nb_delete_all
nb_delete_all <Group>
Removes all NPCs in the game or, if group is specified, removes Specified group only. An example group type would be Infected in L4D.
nb_move_to_cursor Commands all NPCs to move to the location of the 3D cursor

Additional Console Variables

Command Description

Team Fortress 2

See also

Non-Game Specific

Left 4 Dead Series

Introduction

Resources