The "exec" command.

Discuss matters related to LDG or UT2004 which aren't specific to any server.
Post Reply
User avatar
Azarael
UT2004 Administrator
Posts: 5365
Joined: Thu 11 Feb , 2010 10:52 pm

The "exec" command.

Post by Azarael » Fri 28 Jan , 2011 1:03 am

The command "exec" in console followed by the name of a text file in the System directory executes all valid commands in that file.

For example, consider two example text files, ASBinds.txt and CBBinds.txt.

ASBinds.txt:

Code: Select all

set input space jump
set input shift walking
and CBBinds.txt:

Code: Select all

set input space cbquickflip
set input shift cbwheely
Typing exec ASBinds.txt will apply Assault keybindings and typing exec CBBinds.txt will apply CarBall bindings. I know the bindings are shitty but they're just an example of how you can switch your binds between mods without spending ages setting them.

Exec will execute any valid commands, and will execute them as fast as possible. I used execs to apply tons of cmdonplayer commands within a very short time in the FarNy incident.

There is an important caveat with this, however - piped binds don't work, or at least, they don't work in Windows 7. This means binds like set input x scopeview | onrelease scopeviewrelease can't be applied with this method.

User avatar
bOnO
UT2004 Administrator
Posts: 1345
Joined: Thu 11 Feb , 2010 11:13 pm
Location: France
Contact:

Re: The "exec" command.

Post by bOnO » Fri 28 Jan , 2011 5:11 pm

Good to know! Now if you could post a list of the important binds for each Mods (or tell where to find it), it would be perfect :)
Because for example cbquickflip, I didn't know it existed unless someone told someone else ingame :(
Its all about the game, and how you play it
All about control, and if you can take it
All about your debt, and if you can payit
Its all about pain and whos gonna make it...

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests