13 Feb 11, 12:25PM
Gibstick is right - that'll probably be the way you want to go - but in case you actually mean doing stuff only if saved.cfg doesn't exist - which is what triggers that initial setup-menu you spoke of:
Naturally you'd probably want to call your own CubeScript-block (read alias) from it - just replace the (bracketed) CubeScript-block by your alias name:
Another good alias to hook into is the mapstartonce, do that from autoexec.cfg and you can then use Gibstick's snippet to check whether you need to run your script or not.
HTH
[SELECT ALL] Code:
add2alias delayed_firstrun [ echo "I'm doing some stuff of my own here!" ]
[SELECT ALL] Code:
add2alias delayed_firstrun my_firstrun
[SELECT ALL] Code:
my_setup = [
my_setupOK = 1
my_var_001 = 1
my_var_002 = 2
echo "done MY setup"
]
check_my_setup = [
if (checkalias my_setupOK) [ ] [ my_setup ]
]
// the following is a handy shortcut:
addOnLoadOnce check_my_setup