Half-Life 2 Console Commands: God Mode, Noclip, NPCs
Valve shipped Half-Life 2 with its developer console intact, and it still turns the game inside out: god mode, noclip, every weapon in one command, and the Citadel supercharged gravity gun available from the first map.

Half-Life 2 shipped with its developer console intact, and two decades of updates later it is still there — the same window Valve's own developers used, pointed at the same engine. Three commands in, you are flying through walls with every weapon in the game. A fourth hands you the Citadel's supercharged gravity gun on the first map.
This guide covers how to turn the console on in the current Steam build, which commands need cheats enabled, what the classic ones actually do, and the button codes that stand in for all of this on the old Xbox 360 and PS3 versions of The Orange Box.
One scope note: if you care about leaderboards, this is the wrong article — speedrun rules treat console use completely differently, and the speedrunning guide covers which commands are legal there. This is the sandbox toolkit.
Turning the console on
PCGamingWiki documents two ways in, and both work on the current build:
Through the menu. Go to Options, open the Keyboard tab, click Advanced, and check Enable the developer console. From then on the tilde key (~, top-left of a US keyboard) opens and closes it.
Through a launch option. Add -console to the game's launch options in Steam and the console opens with the game. From there, bind F2 "toggleconsole" gives you a key to open it in play — and any key can stand in for F2.
The console is a command line: type a command, press Enter. Commands can be chained with semicolons, which is how the multi-step tricks later in this guide fit on one line.
sv_cheats 1 comes first
The Half-Life Wiki's cheat list gives the master switch as:
sv_cheats 1
That turns cheats on; sv_cheats 0 turns them off. Run it before the commands in the next section — it is the toggle the cheat set hangs off, and it costs nothing to set it first rather than wonder why god did not take.
The core cheat commands
These are the commands the Half-Life Wiki lists for the PC version of Half-Life 2:
| Command | What it does |
|---|---|
god | You cannot take damage |
buddha | You take damage down to 1 health, but cannot die |
noclip | Fly freely and pass through walls |
notarget | NPCs can no longer see or target you |
impulse 101 | Gives every weapon |
give item_healthkit | Adds 25 health |
give item_battery | Adds 15 suit energy |
npc_create | Spawns an NPC (see below) |
ai_disable | Turns NPC AI off entirely |
kill | Gordon dies on the spot |
A few of these deserve a sentence more than the table gives them.
buddha is the more interesting invincibility. god deletes the combat system; buddha leaves it running but floors you at 1 health, so fights stay tense without ever ending your session. If you want to see a set piece through rather than skip it, buddha is the better tool.
noclip is the sightseeing command. Half-Life 2's maps extend well past where the game lets you walk, and flying out of bounds over City 17 is a free level-design tour. Type it again to turn it off — preferably over solid ground.
impulse 101 pairs naturally with the weapons guide: every gun in the arsenal, delivered at once, on any map. It is also the quickest way to test-drive weapons the game holds back for hours, like the crossbow and RPG.

The super gravity gun, anywhere in the game
The single best cheat in Half-Life 2 is one convar:
physcannon_mega_enabled 1
The Half-Life Wiki's gravity gun page confirms what it does: your gravity gun becomes the supercharged blue version the game normally grants only inside the Citadel — the one that picks up living Combine soldiers and one-shots them into walls. With the convar on, it works in normal play, from the moment you have the gun.
There is one documented side effect worth knowing before you flip it: while the command is enabled, any NPC's weapon disintegrates when they die, everywhere in the game, regardless of what weapon it is. You are trading looted ammo for the super gravity gun. Take the trade at least once — running Ravenholm with the super gravity gun is a different game.
The gravity gun guide covers what both versions of the weapon can do in detail.

Spawning NPCs with npc_create
The spawn command takes the form:
npc_create npc_<name>
It creates the NPC where you are looking. The Half-Life Wiki's list of valid names is long; these are the ones that make the best sandbox ingredients:
| Name | Spawns |
|---|---|
npc_combine_s | Combine soldier (with a shotgun, if its weapon is set to one) |
npc_metropolice | Civil Protection officer |
npc_strider | Strider |
npc_combinegunship | Gunship |
npc_combinedropship | Dropship |
npc_antlion | Antlion soldier |
npc_antlionguard | Antlion guard |
npc_zombie | Zombie |
npc_fastzombie | Fast zombie |
npc_poisonzombie | Poison zombie |
npc_headcrab | Headcrab |
npc_manhack | Manhack |
npc_rollermine | Rollermine |
npc_turret_floor | Combine sentry gun |
npc_alyx | Alyx Vance |
npc_barney | Barney Calhoun |
npc_dog | Dog |
npc_monk | Father Grigori |
npc_vortigaunt | Vortigaunt |
npc_citizen | Citizen |
The same list runs through birds (pigeon, crow, seagull), the barnacle, the ichthyosaur, scanners, ceiling and ground turrets, and hopper mines. The Episodes add their own names on top — zombine needs Episode One or Two, hunter and magnusson need Episode Two, and ministrider is the Episode One name for a Hunter, which the wiki flags as running worse AI than Episode Two's hunter.
If you want a field guide to what you just spawned — and what it will do to everything else in the room — the enemies guide covers the full roster.

Two entity commands worth learning
Two deeper cuts from the same wiki list, both built on ent_fire:
Ignite anything. ent_fire npc_<name> ignite sets the named NPC type on fire. Zombies already burn in the game's fiction; now everything else can too.
Rewrite loyalties. ent_fire npc_<name> setrelationship "<target> D_LI 99" makes that NPC type friendly toward the target — D_LI is the friendly disposition, D_HT is hostile, and the target can be PLAYER or another NPC class like npc_alyx. This is the command that turns a spawned Combine squad into your personal escort, or sets two factions on each other while you watch from a rooftop with notarget on.
There is also a spawn the normal command cannot produce. The Overwatch Elite — the white-masked soldier — is listed as unspawnable through npc_create, but the wiki gives the entity-level workaround:
ent_create npc_combine_s model models/combine_super_soldier.mdl
Appending additionalequipment weapon_<weaponname> to that line spawns him armed.
Useful commands that are not cheats
Not everything worth typing needs sv_cheats. These are pulled from PCGamingWiki's Half-Life 2 page:
fps_max— the game caps at 300 FPS by default; the console can raise the cap to 1000, andfps_max 0uncaps it entirely. The engine tick rate stays fixed at 66.666 Hz either way, so this is smoothness, not game speed.-novid— a launch option, not a console command: skips the Valve intro video.map <mapname>— loads any map directly, e.g.map d1_trainstation_01for the start of the game.snd_legacy_surround 1— re-enables legacy surround mixing, the first step in PCGamingWiki's recipe for proper positional audio on headphones.joystick 1followed byexec 360controller— restores legacy controller support on the 20th Anniversary build, which removed the menu option for it; PCGamingWiki notes you need Steam Input disabled first.
The console even hides a co-op mode. PCGamingWiki documents LAN play as "hackable": type maxplayers 4; sv_lan 1, then map d1_trainstation_01, and the campaign loads as a LAN server. The caveats are real — the game will not load autosaves in this state, and dead players respawn rather than reloading — which is why the wiki points anyone serious about co-op at the Synergy mod instead. But as a fifteen-second party trick built entirely from stock console commands, it is hard to beat.
Cheating on Xbox and PlayStation
The Orange Box versions of Half-Life 2 do not expose a console in-game, so cheats live on button combinations, entered during play. The Half-Life Wiki lists these for Xbox 360:
| Effect | Code |
|---|---|
| God mode | LB, Up, RB, Up, LB, LB, Up, RB, RB, Up |
| Free health | Up, Up, Down, Down, Left, Right, Left, Right, B, A |
| Full ammo | RB, Y, B, A, X, RB, Y, X, A, B, RB |
| Unlock all levels | Left, Left, Left, Left, LB, Right, Right, Right, Right, RB |
And for PlayStation 3:
| Effect | Code |
|---|---|
| Restore health | Up, Up, Down, Down, Left, Right, Left, Right, O, X |
| Restore ammo | R1, Triangle, O, X, Square, R1, Triangle, Square, X, O, R1 |
| All levels | Left, Left, Left, Left, L1, Right, Right, Right, Right, R1 |
The free-health code is the Konami Code, unchanged. The wiki also notes the console builds are close enough to the PC version that editing the configuration file can bind a button to open the developer console even there.
Quick Action Checklist
- Enable the console: Options, Keyboard tab, Advanced, check Enable the developer console, then open it with the tilde key.
- Type
sv_cheats 1before any cheat command. godfor invincibility,buddhato keep fights tense but unloseable,noclipto fly,impulse 101for every weapon.physcannon_mega_enabled 1unlocks the Citadel supercharged gravity gun anywhere — at the cost of NPC weapons disintegrating on death while it is on.npc_create npc_<name>spawns NPCs where you look;ent_fire npc_<name> setrelationship "PLAYER D_LI 99"makes them friendly.fps_max 0uncaps the 300 FPS default limit without touching cheats.- On Xbox 360 and PS3 Orange Box, use the button codes — health, ammo, god mode and level select are all reachable without a console.
Frequently Asked Questions
How do you open the console in Half-Life 2?
What is the Half-Life 2 command for all weapons?
How do you spawn NPCs in Half-Life 2?
What is the super gravity gun command in Half-Life 2?
Does Half-Life 2 have cheats on Xbox and PlayStation?
Keep Reading
- Half-Life Wiki — The Orange Box cheats: PC console commands, npc_create name list, and the Xbox 360 and PS3 button codes
- Half-Life Wiki — physcannon_mega_enabled 1 and the supercharged gravity gun in normal play
- PCGamingWiki — enabling the developer console, fps_max limits, launch options, and the LAN co-op console method
Related Guides

Half-Life 2 Soundtrack: Every Track and Where It Plays
Half-Life 2 has less music in it than you think, and a surprising amount of what is there is recycled Half-Life 1. Here is the whole 43-track album mapped to the exact moment each cue fires, the seven album tracks that play nowhere in the game, and where to get it legally.

Half-Life 2 RTX: Is It Out? What the Demo Contains
Half-Life 2 RTX was announced at gamescom 2023. Three gamescoms later, with the 2026 show closing today, the only thing you can install is a two-chapter demo that has not been patched since May 2025. Here is exactly what exists, what it needs, and what has never been dated.

Half-Life 2 VR Mod: What It Needs and What It Changes
Half-Life 2 has a full roomscale VR conversion, it costs nothing, both episodes have one too, and it just got its first patch note on Steam in over two years. It is also not the version of Half-Life 2 you think it is: the VR build is a separate install that the 20th Anniversary Update never reached.

Half-Life 2 Lost Coast: How to Play It and What Is In It
Valve unlisted Half-Life 2: Lost Coast from the Steam store and folded it into Half-Life 2 itself. It is still there, it is still the best fifteen minutes of graphics-programming history you can play, and it is where the developer commentary system was invented.

Half-Life 2 Beginner's Guide: Start Strong in City 17
Half-Life 2 never stops to explain itself, which is why new players stall in Ravenholm with no shotgun ammo and no idea the gravity gun was the answer. Here is the chapter map, the systems the game hides, and the mistakes that waste your first playthrough.

Half-Life 2: Deathmatch Guide: The Mode Valve Never Stopped Patching
Valve pulled Half-Life 2: Deathmatch off the store in November 2024 and then, three months later, shipped it a 64-bit build, a client prediction rewrite, and a 100-player ceiling. Eight maps, a cut campaign weapon, and a gravity gun other people are aiming back at you.