Portal 2 Hints

PC Cheat Codes

  • To enable the cheat console, go to the Options menu and choose "Keyboard/Mouse," then click on "Allow Developer Console" to enable it.

    Once that's done, you can press ~ anytime while playing or on the main menu screen to bring up the console window. To get the cheats fully enabled, you need to enter the code sv_cheats 1 on the console after loading your saved game or starting a new game. Once that's done, any of the cheat codes can be entered to get the desired effect. (Note that the sv_cheats 1 code has to be re-entered every time you run the game, but the effects of many individual cheats, such as invincibility, are stored in each saved game.)

    NOTE: You can type one letter on the console line and then use the up and down arrow keys to look through all the commands and variables and so forth that start with that letter. Also, you can use the "find" command to find everything related to the parameter (as in find map to find all map-related entities) and the "help" command to get a bit of info about something (as in help noclip).

    You can use the "bind" command to bind a cheat command to a key. For instance, to be able to press X at any time to toggle noclipping mode, type: bind x noclip.

    * god -- invincibility toggle
    * noclip -- noclipping mode toggle (fly and walk through walls)
    * sv_noclip_speed # -- set the speed at which you move while in noclipping mode (default is 5, but 2 or 3 would probably work better)

    * give weapon_portalgun -- gives you a portal gun if you don't already have one
    * upgrade_portalgun -- upgrades your portal gun (if you have one) to fire both types of portals
    * sv_portal_placement_never_fail # -- set to 1 so portals can form almost anywhere, including on dark metal surfaces (0 resets to normal)

    * ent_create_portal_companion_cube -- create a companion cube
    * ent_create_portal_reflector_cube -- create a redirection cube
    * ent_create_paint_bomb_jump -- create a glob of repulsion gel (move into it to burst it)
    * ent_create_paint_bomb_speed -- create a glob of propulsion gel (move into it to burst it)
    * ent_create_paint_bomb_portal -- create a glob of conversion gel (move into it to burst it)
    * ent_create_paint_bomb_erase -- create a glob of water (move into it to burst it)

    * getpos -- show your current position and angle coords (you can copy this command's output line and paste it onto the command line to use as a command)
    * setpos x y z -- replace x, y, and z with position coords for where you want to teleport to
    * cl_showpos # -- set to 1 to get your position coords, view angle, and velocity to constantly display in the top left corner of the screen (0 removes them)

    * firstperson -- switch to first-person perspective
    * thirdperson -- switch to third-person perspective
    * mat_fullbright # -- set to 1 to remove all shadows (0 restores shadows)
    * status -- show some game info, including current map code and position coords