Skip to main content

Useful CVars & Console Commands

CVars & Commands​


Command / CVarAction
finduse this command to find commands in the console;
- find cvar <string> - search for a cvar
- find command <string> - search for a command
mapspecify the map you would like to load in Engine
spawnspecify an entity you would like to spawn in the map
givespecify an item to give to the player
noclipallows the player to fly around the world without collision (similar to using World Camera in the editor)
notargetremoves the player as a target for AI
godthe player will not take any damage and cannot die
g_infiniteammoprovide infinite ammo to player
g_stoptimefreezes the game (any AI, movers, particles, projectiles all stop in place)
g_showentityinfoDraws a box around all entities and prints entity name/number in the box (cyan for actors, orange for triggers, green for solid, grey for everything else)
r_showparticleinfoDraws info on in-game particles
r_skip + Tabdisplays a list of cvars that allow the user to disable specific stages of the renderer
r_showrenderperformancedatadisplay a render performance data panel
r_showsurfaceinfouse to identify materials (useful in figuring out problems rendering a scene)
r_showpixellightsshow all light sources and decals on pixels
r_showlightcenterdisplay a cross on the center of each light
debuglighting + Tabdisplays a list of commands for debugging different parts of lighting
s_debugprints sound events into the console and on screen
s_volumesdebugdisplays sound area volumes in-engine
anim_debugEventsprints animation events to the console
whereprints coordinates of current camera location to the console
setviewpos (coords)transports player/camera to coordinated obtained through where command
info

r_showparticleinfo States:

  • 0 = off
  • 1 = show particle info (prints decl name)
  • 2 = show particle counts non-depth-tested
  • 3 = dump particle info to console
tip

Pressing Tab will suggest options to complete a command or CVar (e.g. Type spawn ai/ + Tab for a list of options)

Binding commands and CVars to the keyboard​


Commands and CVars can be bound to the keyboard so that you can easily turn particular commands on and off while testing your map.

bind <key> <command>​

Command​

bind <key> <command>

Example​

bind n noclip

tip

Commands that only have an on/off state can be bound with just bind and a key

bind <key> toggle <CVar> <states>​

Command​

bind <key> toggle <CVar> <states>

Example​

bind j toggle g_stoptime 0 1

tip

Commands that have multiple states must also include a toggle command