quickly change key settings without using menu
quickly change key settings without using menu
I want to quickly change key settings, without using preferences menu. So if "forward" is set to "space" key, on another map I want to quickly change it to "enter" key.
Re: quickly change key settings without using menu
You can use the "set input <keyname> <command>" consolecommand for that.
-
- Average
- Posts: 61
- Joined: Thu Jun 03, 2010 3:53 pm
Re: quickly change key settings without using menu
Couldn't you have a key bound to an exec command?
e.g. if you use CTRL as your 'switcher' key, then bind something like this to it:
then in SetupA.txt have this:
and in SetupB.txt have this:
e.g. if you use CTRL as your 'switcher' key, then bind something like this to it:
Code: Select all
Ctrl = exec SetupA.txt
Code: Select all
//Controls go here
set input W MoveForward
set input A StrafeLeft
set input S MoveBackward
set input D StrafeRight
set input Up SwitchWeapon 10
set input Down SwitchWeapon 4
set input Left SwitchWeapon 7
set input Right SwitchWeapon 9
//
set input Ctrl exec SetupB.txt
Code: Select all
//Controls go here
set input Up MoveForward
set input Left StrafeLeft
set input Down MoveBackward
set input Right StrafeRight
set input W SwitchWeapon 10
set input S SwitchWeapon 4
set input A SwitchWeapon 7
set input D SwitchWeapon 9
//
set input Ctrl exec SetupA.txt
Last edited by Meindratheal on Sat Jul 31, 2010 2:24 pm, edited 2 times in total.
Re: quickly change key settings without using menu
I tried it, exactly as written, but it didn't work.
Should this be written in the .ini file?
Should the keys that I want in double settings, be removed from the .ini file, and then I make 2 new .txt files with the different settings for these keys?
Should this be written in the .ini file?
Code: Select all
Ctrl = exec SetupA.txt
then in SetupA.txt have this:and in SetupB.txt have this:Code: Select all
//Controls go here W=MoveForward A=StrafeLeft S=MoveBackward D=StrafeRight Up=SwitchWeapon 10 Down=SwitchWeapon 4 Left=SwitchWeapon 7 Right=SwitchWeapon 9 // set input Ctrl SetupB.txt
Code: Select all
//Controls go here Up=MoveForward Left=StrafeLeft Down=MoveBackward Right=StrafeRight W=SwitchWeapon 10 S=SwitchWeapon 4 A=SwitchWeapon 7 D=SwitchWeapon 9 // set input Ctrl SetupA.txt
Last edited by okeee on Sat Jul 31, 2010 1:21 pm, edited 1 time in total.
-
- Average
- Posts: 61
- Joined: Thu Jun 03, 2010 3:53 pm
Re: quickly change key settings without using menu
You don't need to remove the keys in SetupA and SetupB from the User.ini as this script will just overwrite the commands. In this example, SetupA.txt has movement on WASD and getweapon binds on Up, Down, Left, Right. SetupB.txt, on the other hand, has getweapon binds on WASD and movement on Up, Down, Left, Right. Just customise these files to the keys you need changing, and edit the line for your 'switch' key to "<key> = exec SetupA.txt"
Just have your commands (the ones you want to change) in the gap for the controls, and make sure that you keep the last line in each file. Then just put these files in your System folder.
Sorry if I'm being confusing, I'm useless at giving advice :s
IMPORTANT EDIT: My script was slightly wrong, check it now for a working one
Just have your commands (the ones you want to change) in the gap for the controls, and make sure that you keep the last line in each file. Then just put these files in your System folder.
Sorry if I'm being confusing, I'm useless at giving advice :s
IMPORTANT EDIT: My script was slightly wrong, check it now for a working one
Re: quickly change key settings without using menu
It does change to the new key setting, but it doesn't change back to the old key setting. Is it possible to switch between the 2 different key settings, using 1 key?
-
- Average
- Posts: 61
- Joined: Thu Jun 03, 2010 3:53 pm
Re: quickly change key settings without using menu
You need to make sure that your 'switcher' key is set in the SetupA and SetupB files. If you switcher key is X for example, the last line needs to be "set input X SetupA.txt" and set input X SetupB.txt"
Re: quickly change key settings without using menu
Yes I have that. Something strange I noticed, this:
from the .ini file, gets automatically changed into this
after starting unreal. I have no idea why that is.
Code: Select all
Ctrl = exec SetupA.txt
Code: Select all
Ctrl = SetupB.txt
-
- Average
- Posts: 61
- Joined: Thu Jun 03, 2010 3:53 pm
Re: quickly change key settings without using menu
My bad (again). My apologies, I'll update again
I told you I was terrible o_O
I told you I was terrible o_O
Re: quickly change key settings without using menu
Ok this works, but it seems I asked the question the wrong way. I meant, use 1 button to do "forward" on 1 map, and using that same button to do "jump" on another map.
So for example:
up-arrow = forward
space = forward
switch to:
up arrow = forward
space = jump
So for example:
up-arrow = forward
space = forward
switch to:
up arrow = forward
space = jump
-
- Average
- Posts: 61
- Joined: Thu Jun 03, 2010 3:53 pm
Re: quickly change key settings without using menu
So in your files, couldn't you just have
in setup1.txt
and
in setup2.txt?
Code: Select all
set input Space MoveForward
and
Code: Select all
set input Space Jump