Useful CVars & Console Commands
CVars & Commands
| Command / CVar | Action |
|---|---|
find | use this command to find commands in the console; - find cvar <string> - search for a cvar - find command <string> - search for a command |
map | specify the map you would like to load in Engine |
spawn | specify an entity you would like to spawn in the map |
give | specify an item to give to the player |
noclip | allows the player to fly around the world without collision (similar to using World Camera in the editor) |
notarget | removes the player as a target for AI |
god | the player will not take any damage and cannot die |
g_infiniteammo | provide infinite ammo to player |
g_stoptime | freezes the game (any AI, movers, particles, projectiles all stop in place) |
g_showentityinfo | Draws 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_showparticleinfo | Draws info on in-game particles |
r_skip + Tab | displays a list of cvars that allow the user to disable specific stages of the renderer |
r_showrenderperformancedata | display a render performance data panel |
r_showsurfaceinfo | use to identify materials (useful in figuring out problems rendering a scene) |
r_showpixellights | show all light sources and decals on pixels |
r_showlightcenter | display a cross on the center of each light |
debuglighting + Tab | displays a list of commands for debugging different parts of lighting |
s_debug | prints sound events into the console and on screen |
s_volumesdebug | displays sound area volumes in-engine |
anim_debugEvents | prints animation events to the console |
where | prints 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