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
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: 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.

Half-Life 2 Speedrunning Guide: The Bug That Beats the Game in 36 Minutes
The Half-Life 2 world record is 36 minutes and 30 seconds across 69 maps. The reason is that Valve wrote a speed limiter that checks which way you are looking instead of which way you are moving.

Half-Life 2 Uprising Guide: Squad Command and the Nexus
Half-Life 2 hands you a four-man rebel squad in Anticitizen One and never explains the button that commands it. Here is the squad system in full, all eleven lambda caches across the uprising, the Nexus room that can trap your save, and the exact rocket counts for every Strider and gunship.

Half-Life 2 Nova Prospekt Guide: Bugbait, Turrets, and the Standoff That Ends Runs
Nova Prospekt is where Half-Life 2 stops being a chase. Here is how bugbait actually works, why your antlions go deaf the second a Guard shows up, how to win both turret standoffs in Entanglement, and the reprogrammed-turret habit that can quietly kill your save without ever showing a game over screen.

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 Achievements Guide: The Runs Worth Planning
Half-Life 2 pays 2 Gamerscore for a basketball shot and 25 for surviving Ravenholm with one weapon. Here is the full 33-achievement list sorted by what actually needs planning: the Zombie Chopper rules, the exact Keep Off the Sand window, all 45 lambda caches, and the missables.