ut2004 exec command for keybinds/config

You need help? It's here!
Post Reply
User avatar
darkelf
Disappeared Administrator
Posts: 949
Joined: Sun 15 Jan , 2012 12:34 pm
Contact:

ut2004 exec command for keybinds/config

Post by darkelf » Sun 01 Apr , 2018 9:40 pm

Tutorial on how to use exec command

Description: The exec command in a nutshell allows you to run/start a script or file from the ut2004 console.
Why would I care: This command can allow you to run many set input/set file.extention commands via just one click of a button. This is usefull if you want to have mutliple keyboard layouts and or user.ini/ut2004.ini config changes at different times during your gaming experience in ut2004. Had a few people ask about how or if this was possible, so here it is.

Example idea 1: Hitting the letter "j" on your keyboard will trigger the letters "u" ,"i", "o" and "p" to be binded to multiple different chat messages. Note: This example is a one time config change. See below example 2 for multiple configs.

Step 1: Open notepad and save a .txt document as config1

Step 2: Type the set input commands for each of these keys(example below) and save the file. Each set input or command should be on its own line(ie press enter after each command).

Code: Select all

set input u say I like penguins!
set input i say I really like penguins!
set input o say I really really like penguins!
set input p say I really really really like penguins!
Step 3: Place config1.txt into your ut2004/systems folder.

Step 4: Start ut2004 and open console and type in the following:

Code: Select all

set input j exec config1.txt
Step 5: Press J. You should now be able to press "u" ,"i", "o" and "p" and get the chat messages that we wrote above.

Example idea 2: Hitting the letter "j" on your keyboard will trigger the letters "u" ,"i", "o" and "p" to be binded to multiple different chat messages. Hitting "j" again will reset "u" ,"i", "o" and "p" back to weapon slots.

Step 1: Open notepad and save a .txt document as config1

Step 2: Type the set input commands for each of these keys(example below) and save the file. Each set input or command should be on its own line(ie press enter after each command).

Code: Select all

set input u say I like penguins!
set input i say I really like penguins!
set input o say I really really like penguins!
set input p say I really really really like penguins!
set input j exec config2.txt
Step 1: Open another .txt document and save it as config2

Step 3: Type the set input commands for each of these keys(example below) and save the file. Each set input or command should be on its own line(ie press enter after each command).

Code: Select all

set input u SwitchWeapon 1
set input i SwitchWeapon 2
set input o SwitchWeapon 3
set input p SwitchWeapon 4
set input j exec config1.txt
Step 3: Place config1.txt and config2.txt into your ut2004/systems folder.

Step 4: Start ut2004 and open console and type in the following:

Code: Select all

set input j exec config1.txt
Step 5: Press "j", you should now be able to press "u" ,"i", "o" and "p" and get the chat messages that we wrote above. Press "j" again and "u" ,"i", "o" and "p" should be bound to weapon slots.


Any commands you can do via ut2004 console ingame you can put into the txt file and be able to exec it via the "exec" command. Let me know if you have any questions or need further explanation.
Image
Modified Skins links: Yoda team colors viewtopic.php?f=8&t=2134&p=19097#p19097 Man assassin viewtopic.php?f=8&t=1468&p=10763#p10763 Women Assassin viewtopic.php?f=8&t=1999&p=16615&hilit=skin#p16615
> WebAdmin [dark_elfy]: who is this pepsiman.. he seems really talkative and pissed off
> Earl_Vencar.:LLS:.: i told him i liked coca cola

User avatar
Satin
UT2004 Administrator
Posts: 571
Joined: Sat 15 Dec , 2012 12:07 pm
Location: UK
Contact:

Re: ut2004 exec command for keybinds/config

Post by Satin » Mon 02 Apr , 2018 10:55 am

Thanks elfy, that's really useful :)
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests