Script Demo - Keyboard Switch

From Cube Wiki
Revision as of 16:59, 12 December 2014 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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).