• Console scripting in Source engine games
    10 replies, posted
I want to make a single command to execute all of these commands in the console: cl_detaildist 100 cl_ejectbrass 0 cl_smooth 0 dsp_slow_cpu 1 mp_decals 50 r_lod 2 r_dynamic 0 mat_bumpmap 0 mat_specular 0 (fixes floor as well) r_drawflecks 0 mat_dxlevel 70 muzzleflash_light 0 Basically so that I only have to type something like "exec slow" instead of all that stuff. Is this possible? I couldn't find anything with a quick search...
Make a file in the CFG folder in what ever game directory you wish. Save it as slow.cfg. then add all that to the config file. Can't remember if you need a ; between each command, or if a line in between like you have in your post will do. Then type 'exec slow' and that should work.
I tried it, and it is returning that it couldn't execute it (or slow.cfg). Is it necessary to compile it or anything first? (Note that may affect things if Gmod is crazy: I'm testing this in Gmod)
Save it as name.cfg in the config folder of your game (e.g. for CS:Source it's C:/Program Files/Steam/steamapps/username/counter-strike source/cstrike/cfg) Then in console just type in exec name
That's what I'm trying, unfortunately I must be doing something wrong... Location: [code]C:\Program Files\Steam\steamapps\eddygazilion\garrysmod\garrysmod\cfg\slow.cfg[/code] Thing I'm plugging into console: [code]exec slow[/code] Thing returned when I try that: [code]exec: couldn't exec slow[/code] What's in slow.cfg: [code]cl_detaildist 100 cl_ejectbrass 0 cl_smooth 0 dsp_slow_cpu 1 mp_decals 50 r_lod 2 r_dynamic 0 mat_bumpmap 0 mat_specular 0 (fixes floor as well) r_drawflecks 0 mat_dxlevel 70 muzzleflash_light 0[/code] Anyone see anything horrible there?
take off the '(fixes floor as well)'
Are you sure it's a .cfg file? Even if you named it and have the .cfg ending; it can still be a txt file. Best way to check is just do save as, save as type=all files, and then name it slow.cfg
Whoops, copied from the wrong slow.cfg! That is gone in the one in the game. Just confirmed and tried it again, same result... :P EDIT: IT WORKS! Thank you Chunkyman for that bit of information! And to the MightyHaku and Pandamobile!
alias "slow" "cl_detaildist 100; cl_ejectbrass 0; cl_smooth 0; dsp_slow_cpu 1; mp_decals 50; r_lod 2; r_dynamic 0; mat_bumpmap 0; mat_specular 0; r_drawflecks 0; mat_dxlevel 70; muzzleflash_light 0" Put this command in the config.cfg or autoexec.cfg and then write on console [b]slow[/b]. Should work too.
Well now you've done it, Mind telling us what it's for?
[QUOTE=Rowtree;19247769]Well now you've done it, Mind telling us what it's for?[/QUOTE] It sets the graphic settings even lower.
Sorry, you need to Log In to post a reply to this thread.