quickly change key settings without using menu

Discussions about UT99
Post Reply
okeee
Novice
Posts: 21
Joined: Fri Mar 05, 2010 12:20 pm

quickly change key settings without using menu

Post by okeee »

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.
User avatar
anth
Adept
Posts: 257
Joined: Thu May 13, 2010 2:23 am

Re: quickly change key settings without using menu

Post by anth »

You can use the "set input <keyname> <command>" consolecommand for that.
Meindratheal
Average
Posts: 61
Joined: Thu Jun 03, 2010 3:53 pm

Re: quickly change key settings without using menu

Post by Meindratheal »

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:

Code: Select all

Ctrl = exec SetupA.txt
then in SetupA.txt have this:

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
and in SetupB.txt have this:

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.
okeee
Novice
Posts: 21
Joined: Fri Mar 05, 2010 12:20 pm

Re: quickly change key settings without using menu

Post by okeee »

I tried it, exactly as written, but it didn't work.

Should this be written in the .ini file?

Code: Select all

Ctrl = exec SetupA.txt
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?
then in SetupA.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
and in SetupB.txt have this:

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.
Meindratheal
Average
Posts: 61
Joined: Thu Jun 03, 2010 3:53 pm

Re: quickly change key settings without using menu

Post by Meindratheal »

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 :)
okeee
Novice
Posts: 21
Joined: Fri Mar 05, 2010 12:20 pm

Re: quickly change key settings without using menu

Post by okeee »

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?
Meindratheal
Average
Posts: 61
Joined: Thu Jun 03, 2010 3:53 pm

Re: quickly change key settings without using menu

Post by Meindratheal »

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"
okeee
Novice
Posts: 21
Joined: Fri Mar 05, 2010 12:20 pm

Re: quickly change key settings without using menu

Post by okeee »

Yes I have that. Something strange I noticed, this:

Code: Select all

Ctrl = exec SetupA.txt
from the .ini file, gets automatically changed into this

Code: Select all

Ctrl = SetupB.txt
after starting unreal. I have no idea why that is.
Meindratheal
Average
Posts: 61
Joined: Thu Jun 03, 2010 3:53 pm

Re: quickly change key settings without using menu

Post by Meindratheal »

My bad (again). My apologies, I'll update again :P

I told you I was terrible o_O
okeee
Novice
Posts: 21
Joined: Fri Mar 05, 2010 12:20 pm

Re: quickly change key settings without using menu

Post by okeee »

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
Meindratheal
Average
Posts: 61
Joined: Thu Jun 03, 2010 3:53 pm

Re: quickly change key settings without using menu

Post by Meindratheal »

So in your files, couldn't you just have

Code: Select all

set input Space MoveForward
in setup1.txt

and

Code: Select all

set input Space Jump
in setup2.txt?
Post Reply