Portal
182 ratings
Console Commands
By happy wheels man
Console commands for Portal
5
4
3
3
   
Award
Favorite
Favorited
Unfavorite
Opening the console
There are two ways to do this.

Open the game, click on options and go to keyboard
click on advanced and enable the console

the other way is to open properties and in launch options type -console

Load a level and press ` to open the console
Objects
Weighted Storage Cube:
ent_create_portal_weight_box

Companion Cube:
ent_create_portal_weight_box ; ent_fire !picker skin 1

Edgeless Safety Cube (Doesn't work on buttons):
ent_create_portal_metal_sphere
ent_fire !picker skin 1 (To show the red eye from the ending scene)

High Energy Pellet:
fire_energy_ball

Infinite High Energy Pellet:
ent_create point_energy_ball_launcher BallLifetime -1 ballcount 1 minspeed 400 maxspeed 300 ballradius 12.0 angles 90 0 0

Glados:
prop_dynamic_create gladdysdestruction/gladdysbody

Hoopy the hoop:
prop_dynamic_create gladdysdestruction/glados_junk_05_

Glados pieces:
prop_dynamic_create gladdysdestruction/glados_junk_06_
prop_dynamic_create gladdysdestruction/glados_junk_04_
prop_dynamic_create gladdysdestruction/glados_junk_03_
prop_dynamic_create gladdysdestruction/glados_junk_02_
prop_dynamic_create gladdysdestruction/glados_junk_01_

The Cake is(n't) a lie:
prop_dynamic_create props/cake/cake

Portal Gun:
ent_create weapon_portalgun

Glados chamber door:
prop_dynamic_create props/door_02

Elevator:
prop_dynamic_create props/round_elevator_body
prop_dynamic_create props/round_elevator_doors

Pedestal Button (Can't press)
prop_dynamic_create props/switch001

Toilet:
prop_dynamic_create props/toilet_body_reference

Aperture Science Emergency intelligence Incinerator:
prop_dynamic_create props_bts/glados_aperturedoor

High energy pellet launcher and catcher:
prop_dynamic_create props/combine_ball_launcher
prop_dynamic_create props/combine_ball_catcher

Radio:
ent_create updateitem2

Vehicles
Airboat:
ch_createairboat
ent_fire airboat enablegun 1 (add gun)


Jeep:
ch_createjeep
ent_fire jeep enableradar; ent_fire jeep enablegun 1 (add gun)



NPCs
Friendly Fire:
ent_create ai_relationship subject !player target * disposition 1 rank 99 reciprocal 0 startactive 1

HL2 Leftovers:

Barney:
npc_create npc_barney

Alyx:
npc_create npc_alyx

Dr. Breen:
npc_create npc_breen

Mossman:
npc_create npc_mossman

Dog:
npc_create npc_dog

Citizen:
npc_create npc_citizen

Kleiner:
npc_create npc_kleiner

Eli:
npc_create npc_eli

Gman:
npc_create npc_gman

Metro Police:
npc_create npc_metropolice

Combine Soldier:
AR2: ent_create npc_combine_s additionalequipment weapon_ar2
SMG: ent_create npc_combine_s additionalequipment weapon_smg1
Shotgun: ent_create npc_combine_s additionalequipment weapon_shotgun

Combine Soldier (Nova Prospekt)
AR2: ent_create npc_combine_s model models/combine_soldier_prisonguard.mdl additionalequipment weapon_ar2
SMG: ent_create npc_combine_s models/combine_soldier_prisonguard.mdl additionalequipment weapon_smg1
Shotgun: ent_create npc_combine_s models/combine_soldier_prisonguard.mdl additionalequipment weapon_shotgun

Combine Elite:
AR2: ent_create npc_combine_s model models/combine_super_soldier.mdl additionalequipment weapon_ar2
SMG: ent_create npc_combine_s model models/combine_super_soldier.mdl additionalequipment weapon_smg1
Shotgun: ent_create npc_combine_s model models/combine_super_soldier.mdl additionalequipment weapon_shotgun

Combine Sniper (Instant kill)
npc_create npc_sniper

Rollermine:
npc_create npc_rollermine

Dog's Ball
ent_create npc_rollermine spawnflags 65536

Seagull:
npc_create npc_seagull

Pigeon:
npc_create npc_pigeon

Crow:
npc_create npc_crow

Headcrab:
npc_create npc_headcrab

Fast Headcrab:
npc_create npc_headcrab_fast

Poison Headcrab:
npc_create npc_headcrab_poison
npc_create npc_headcrab_black

Zombie:
npc_create npc_zombie
npc_create npc_zombie_torso

Fast Zombie:
npc_create npc_fastzombie
npc_create npc_fastzombie_torso

Poison Zombie:
npc_create npc_poisonzombie

Father Grigori:
npc_create npc_monk

Barnacle:
npc_create npc_barnacle

Antlion:
npc_create npc_antlion

Antlion Guard:
npc_create npc_antlionguard

City Scanner:
npc_create npc_cscanner

Shield Scanner:
npc_create npc_clawscanner

Combine Dropship:
npc_create npc_combinedropship

Vortigaunt:
npc_create npc_vortigaunt

Strider:
ent_create npc_strider

Stalker:
npc_create npc_stalker

Ichthyosaur (Cut half life 2 enemy):
ent_create npc_ichthyosaur

Half life 2 Turret:
npc_create npc_turret_floor

Hopper:
ent_create combine_mine

Manhack:
npc_create npc_manhack



Portal NPCs

Turret:
npc_create npc_portal_turret_floor

Friendly Turret:
ent_create npc_portal_turret_floor spawnflags 512

Broken Turret:
ent_create npc_portal_turret_floor spawnflags 256

Revive Turrets:
While looking at a dead turret, type 'ent_fire !picker toggle' The turret has to be upright.

Camera
ent_create npc_security_camera spawnflags 32

Inactive Camera:
ent_create npc_security_camera spawnflags 32 targetname consolecamera ; ent_fire consolecamera ragdoll
prop_physics_create props\security_camera_prop_reference

Rocket Turret:
npc_create npc_rocket_turret

Morality Core:
ent_create prop_glados_core coretype 3 spawnflags 1048904 cycle 1.00 playbackrate 1.00 sequence 2 delaybetweenlines 0.40

Curiosity Core:
ent_create prop_glados_core coretype 0 spawnflags 1048904 cycle 0.12 playbackrate 1.00 sequence 3 delaybetweenlines 0.40

Crazy Core:
ent_create prop_glados_core coretype 2 spawnflags 1048904 cycle 0.78 playbackrate 1.00 sequence 5 delaybetweenlines 0.10

Anger Core:
ent_create prop_glados_core coretype 1 spawnflags 1048904 cycle 0.91 playbackrate 1.00 sequence 4 delaybetweenlines 0.10



Disable ai:
ai_disable

Weapons
HEV Suit (Required to switch weapons, sprint, see health, etc.):
give item_suit

Aperture Science handheld Portal Device:
Both Portals
ent_create weapon_portalgun CanFirePortal1 1 CanFirePortal2 1
Blue Portal Only
ent_create weapon_portalgun CanFirePortal1 1 CanFirePortal2 0
Orange Portal Only
ent_create weapon_portalgun CanFirePortal1 0 CanFirePortal2 1
Remove Portal Gun
ent_remove_all weapon_portalgun

Gravity Gun:
give weapon_physcannon

Crowbar:
give weapon_crowbar

Pistol:
give weapon_pistol

357 Magnum:
give weapon_357

SMG:
give weapon_smg1

Pulse Rifle:
give weapon_ar2

Shotgun:
give weapon_shotgun

Crossbow:
give weapon_crossbow

Grenade:
give weapon_frag - works once
ent_create weapon_frag - get ammo

Rocket Propelled Grenade (RPG)
give weapon_rpg

Bug bait:
give weapon_bugbait

Stunstick (doesn't give you a weapon, instead, 7 suit power):
give weapon_stunstick

Alyx gun:
give weapon_alyxgun (spawns below you, press e to pick up)

Annabelle:
give weapon_annabelle

Suitcase (Citizen item, no function):
give weapon_citizensuitcase

Package (Citizen item, no function):
give weapon_citizenpackage

Helicopter Bomb:
ent_create grenade_helicopter
ent_create grenade_helicopter spawnflags 65536 - launch with gravity gun to detonate

Hopwire (Cut hl2 weapon)
ent_create weapon_hopwire
hopwire_vortex 1 - required to make it work

Cubemap (debug weapon)
give weapon_cubemap

givecurrentammo - Gives you ammo for the weapon you are currently holding

Rocket:
ent_create rocket_turret_projectile

Remove all Weapons:
ent_create player_weaponstrip targetname noweapons; ent_fire noweapons strip
Sounds
play "[sound name here]"

use "snd_restart" to stop sounds

examples:
play ambient\levels\canals\windchime5.wav
play test\temp\soundscape_test\tv_music.wav
play ambient\music\looping_radio_mix.wav
play music\portal_4000_degrees_kelvin.mp3
play music\portal_still_alive.mp3
play music\portal_you_cant_escape_you_know.mp3
play music\portal_youre_not_a_good_person.mp3
play ambient\alarms\portal_elevator_chime.wav
play ambient\machines\usetoilet_thank.wav
play ambient\machines\ticktock1.wav
Crashers
stylish ways to close the game:

quit
crash
ent_remove worldspawn
ent_fire worldspawn kill
ch_createjalopy
npc_create npc_combine
ent_create player
ent_create generic_actor
Misc
noclip - flying and no collision
sv_cheats 1 - activate this or you wont be able to do most commands
sv_gravity <insert number> - changes gravity. default = 600
host_timescale <insert number> - game speed. default = 1
change_portalgun_linkage_id <insert number> you can place another pair but if you have more than 5 pairs the game will crash
god - invinciblity
buddha - can take damage, but can't die
sv_portal_placement_never_fail 1 - you can place portals anywhere
sv_portal_placement_never_bump 1 - Portal's won't bump on other portals, instead they won't spawn.
thirdperson - camera changes to behind the player
firstperson - default camera
mat_fullbright 1 = removes lighting
mat_wireframe 1 = see the whole world in wireframe
kill - kills the player
showtriggers_toggle - shows the triggers like glados's speech
ent_remove - delete the thing you're looking at, can cause crashes
ent_fire prop_portal fizzle - removes portals
ent_fire !picker skin <insert number> changes the skin of objects you look at
bind <key> <command (can't have spaces)>
map <map name here>
ent_fire point_viewcontrol disable - unlock your camera
fadein - screen fades in - if used in still alive the black background will disappear
fadeout - screen fades out
ent_fire aperture_ai kill - kill glados
Custom """"modes""""
The worst way to play the game

Before launching the game, open it's properties and navigate to 'Launch Options'
type '-tickrate 11'

Now, when you're in the game, type:
mat_fullbright 2
r_drawworld 0
r_drawfuncdetail 0
mat_viewportscale 0.2
fps_max 30

have fun


"""PRO""" tf2 config
mat_dxlevel 80
mat_specular 0
r_drawviewmodel 0
Impulse Commands
sv_cheats 1 are required for the majority of these commands to work:

Impulse 50:
Calls and recalls squads. Squads can be formed by spawning an npc_citizen.
Impulse 76:
Obsolete command. Attempts to precache npc_human_grunt from Half-Life 1, which doesn't exist. Though you could probably troll someone with this so called 'grunt-o-matic'
Impulse 81:
Gives the player a weapon_cubemap. Identical to 'give weapon_cubemap'.
Impulse 82:
Spawns a jeep
Impulse 83:
Spawns an airboat
Impulse 101:
You know it, you love it, it gives you every weapon you could normally get in the Half-Life 2 campaign. And the portal gun.
Impulse 102:
Dedicated command to spawning skulls! woooo!
Impulse 103:
Prints the AI state of the npc you're looking at. Requires 'developer 1'
Impulse 106:
Prints the classname, targetname and model of the entity you're currently looking at.
Impulse 107:
Prints the name of the material you're currently looking at in the console.
Impulse 200:
Holsters or draws the weapon you're holding. Functionality is retained while holstered.
Impulse 203:
Literally just ent_remove.
Map Specific
Chamber 00:
Teleport to the end of the Chamber:
setpos -1040.226440 -863.065247 192.031250

Chamber 01:
Teleport to the end of the Chamber:
setpos -736.651306 -255.760117 640.031250

Chamber 02:
Teleport to the end of the Chamber:
setpos -255.573608 32.619144 64.031250 ; give weapon_portalgun

Chamber 03:
Teleport to the end of the Chamber:
setpos -1665.758545 896.327332 640.031250

Chamber 04:
Teleport to the end of the Chamber:
setpos 607.877563 191.948837 64.031250

Chamber 04:
Teleport to the end of the Chamber:
setpos 114.806244 832.212402 768.031250
57 Comments
Evan 13 Jul @ 4:13pm 
How do I fix my game after using the commands for "The worst way to play the game?"
BlazingFenix 9 Jul @ 1:54pm 
ent_fire jeep enableradar; ent_fire jeep enablegun 1 is rare to work
glich 16 Jun @ 5:53pm 
IT DID IT
glich 16 Jun @ 5:53pm 
happy wheels man  [author] 29 Apr @ 3:39pm 
Are you sure you're typing the right thing? I dont believe there's a reason for it not to work
glich 29 Apr @ 2:39pm 
the Gravity Gun is not sponing
Evan 9 Mar @ 5:20pm 
Do you know what BindToggle does?
PIKMINFAN 9 Mar @ 4:25pm 
ent_create rocket_turret_projectile
happy wheels man  [author] 9 Feb @ 11:57pm 
It kills glados' voice in chambers, probably should've clarified more.
Evan 9 Feb @ 5:45pm 
"ent_fire aperture_ai kill" doesn't work for me.