Created
January 18, 2017 19:06
-
-
Save piotrek-k/2c1a8f2ee13d0445f62cc819d86accd3 to your computer and use it in GitHub Desktop.
This file enables Portal 2 co-op with 1 keyboard + 1 controller on one screen. Paste this file to "C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2\cfg", run game, press F11 to open console, F9 and F10 to switch Xbox controller to player 2. Then, you could be able to open co-op mode in game.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This automatically enables console so you don't have to | |
con_enable 1 | |
// These aliases create an automatic toggle for remapping your controller | |
alias "togglecontroller" "remap1to2" | |
alias "remap1to2" "joy_remap_player_for_controller1 2; alias togglecontroller remap2to1; echo Xbox 360 controller 1 remapped to Player 2" | |
alias "remap2to1" "joy_remap_player_for_controller1 1; alias togglecontroller remap1to2; echo Xbox 360 controller 1 remapped to Player 1" | |
// These aliases create an automatic toggle for remapping your keyboard | |
alias "togglekeyboard" "sv_cheats 1; key_remap_keyboard_for_player1" | |
alias "key_remap_keyboard_for_player1" "in_forceuser 0; alias togglekeyboard key_remap_keyboard_for_player2; echo Keyboard remapped to Player 1" | |
alias "key_remap_keyboard_for_player2" "in_forceuser 1; alias togglekeyboard key_remap_keyboard_for_player1; echo Keyboard remapped to Player 2" | |
// Keybindings to togglecontroller, togglekeyboard and toggleconsole | |
bind "F9" "togglekeyboard" | |
bind "F10" "togglecontroller" | |
bind "F11" "toggleconsole" | |
// The most important part | |
host_writeconfig |
This isn't changing my keyboard from being player 2.
I followed the guide posted, but it only lets me change the controller's player.
Is this meant to be able to switch the keyboard's?
*player
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've got code from this link: How to play Local Co-op with Controller + Keyboard. Thanks Eetami!