home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Added controls tab to options

by AnimateDream on 09/11/2007 00:56, 2 messages, last message: 09/11/2007 06:08, 1710 views, last view: 05/03/2024 14:56

I just wanted to help out so I made a nice change to remap controls and adjust mouse sensitivity to the options menu. I don't know why it wasn't there in the first place.

First open this file
Sauerbraten\data\menus.cfg

Now find the bottom of the options gui which should be about line 621. Make sure you put the cursor above the ] that terminates the options gui's data.

Now copy and paste the following into that spot

guitab "controls"
guitext "mouse sensitivity"
guislider sensitivity 1.0 20.0
actions = [forward backward left right jump attack "saycommand " "universaldelta 1" "universaldelta -1" edittoggle "weapon 1" "weapon 2" "weapon 3" "weapon 4"]

menubind = [ tobind = $arg1; showgui binditto ]
bindit = [ bind $arg1 $tobind ]

keys = "MOUSE1 MOUSE2 MOUSE3 MOUSE4 MOUSE5 SPACE LCTRL RCTRL ALT TAB ESCAPE BACKQUOTE SHIFT BACKSPACE ENTER INSERT DELETE HOME END PAGEUP PAGEDOWN A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9 0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12"

guilistsplit 4 $keys [
guibutton $n (concat bindit $n)
]


Next time you run the game there will be a controls tab in the options menu. Whomever is in charge of the official distributions might want to add this straight away. I'll be working in the c++ code to try to improve AI soon. AI has been a favorite of mine for seven years, back when I created the half-life: counter-strike mod poxbot.

On a final note, thanks to the developers of sauerbraten and cube 2. I find the code is relatively simple, clean, and fast.

   Board Index   

#1: oops

by AnimateDream on 09/11/2007 00:58

Sorry the formatting got messed up, that code lost its proper tabulation. You can add tabs to match the style of the surrounding code if you like. By the way is there a way to enter code in these forums like...
[code] this is code [/code]

reply to this message

#2: Re: oops

by Quin on 09/11/2007 06:08, refers to #1

http://www.pastebin.com/

Alternatively, release sutff as content mods on Quadropolis.

http://www.quadropolis.us/

Conversely, in case you're interested, I should probably point you in the direction of SauerMod, which is a project of mine aimed at extending the engine, part of which the main focus has been Bots and enhanced AI, among other things.

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53848542 visitors requested 71621620 pages
page created in 0.023 seconds using 10 queries
hosted by Boost Digital