Difference between revisions of "Script Demo - Keyboard Switch"

From Cube Wiki
Jump to: navigation, search
 
(No difference)

Latest revision as of 16:59, 12 December 2014

in autoexec.cfg (create in base game dir if it doesn't exist):

bind e []

to disable edittoggle at game engine start. then modify data/menus.cfg:

newgui keyswitcher [
guibutton "normal" [exec gamekeys.cfg]
guibutton "editor" [exec editkeys.cfg]
]

Do not forget to add a "showgui"-line for your new menu too (in data/menus.cfg, e.g. in the main menu). Then all you have to do is copy data/defaults.cfg to gamekeys.cfg and editkeys.cfg (in base folder), remove all non-keybind lines and then edit them to match your needs. Remember to keep the edittoggle bind for editkeys.cfg and in gamekeys.cfg to bind to an empty string (like in autoexec.cfg above).