r/tf2scripthelp • • Dec 11 '14

Resolved crouch and zoom scripts will not work, halp

bind w +mfwd bind s +mback bind a +mleft bind d +mright

alias +mfwd "-back;+forward;alias checkfwd +forward" alias +mback "-forward;+back;alias checkback +back" alias +mleft "-moveright;+moveleft;alias checkleft +moveleft" alias +mright "-moveleft;+moveright;alias checkright +moveright" alias -mfwd "-forward;checkback;alias checkfwd none" alias -mback "-back;checkfwd;alias checkback none" alias -mleft "-moveleft;checkright;alias checkleft none" alias -mright "-moveright;checkleft;alias checkright none" alias checkfwd none alias checkback none alias checkleft none alias checkright none alias none ""

alias "+zoomer" "fov_desired 75; r_drawviewmodel 0" alias "-zoomer" "fov_desired 90; viewmodel_fov 110; r_drawviewmodel 1" bind “’” "+zoomer"

alias +crouchjump "+jump; +duck" alias -crouchjump "-duck; -jump" bind "space" "+crouchjump"

this is my autoexec (the important parts) what I want is the null movement, crouch, and zoom scripts to work, I also have the crouch and null movement scripts put into each of my class.cfgs (ex. pyro.cfg etc.) but the scripts dont work unless I type in console "exec autoexec.cfg" this is very annoying to do and typing this in messes up a bit of my other scripts for my classes. Please halp me guys, my goal is to get the crouch, zoom, and null movement to work automattically for all classes without messesing up my other scripts in them

0 Upvotes

126 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Dec 11 '14

bind w +mfwd bind s +mback bind a +mleft bind d +mright

alias +mfwd "-back;+forward;alias checkfwd +forward"
alias +mback "-forward;+back;alias checkback +back"
alias +mleft "-moveright;+moveleft;alias checkleft +moveleft"
alias +mright "-moveleft;+moveright;alias checkright +moveright"
alias -mfwd "-forward;checkback;alias checkfwd none"
alias -mback "-back;checkfwd;alias checkback none"
alias -mleft "-moveleft;checkright;alias checkleft none"
alias -mright "-moveright;checkleft;alias checkright none"
alias checkfwd none
alias checkback none
alias checkleft none
alias checkright none
alias none ""

alias "+zoomer" "fov_desired 75; r_drawviewmodel 0"
alias "-zoomer" "fov_desired 90; viewmodel_fov 110; r_drawviewmodel 1"
bind “’” "+zoomer"

alias +crouchjump "+jump; +duck"
alias -crouchjump "-duck; -jump"
bind "space" "+crouchjump"

// Unexplained crashes? Try changing mat_queue_mode to `-1'.
// ----------------------------------------------------------------------------
// Chris' maxframes config, designed to get you a large performance boost
// v2.016 | 25 January 2013 | fakkelbrigade.eu/chris/configs/
// ----------------------------------------------------------------------------
// Problems or questions? Contact me at #christf2 on QuakeNet.
// ----------------------------------------------------------------------------
// Launch options:
// IMPORTANT: Remove -dxlevel 81 from the launch options after the first launch!
//
// Fullscreen: -dxlevel 81 -full -w WIDTH -h HEIGHT -console -novid -useforcedmparms -noforcemaccel -noforcemspd
// Windowed:   -dxlevel 81 -sw -w WIDTH -h HEIGHT -console -noborder -novid -useforcedmparms -noforcemaccel -noforcemspd
// ----------------------------------------------------------------------------

// ----------------------------------------------------------------------------
// FPS cap
// ----------------------------------------------------------------------------
// The primary benefit of an FPS cap is to make the FPS more stable, other than
// that, it doesn't do a lot. A moderate, consistent framerate is much more
// desirable than a variable but sometimes high framerate. A common
// misconception is that if any more frames are generated than your monitor can
// display, they are useless. This is wrong -- frames are used for much more
// than mere display, and affect the way the game feels well past your
// refresh rate.
//
// This FPS cap should *always* be set to a value higher than `cl_cmdrate' in
// any case, or the discrepancy between clientside frame generation and frames
// to be sent to the server will no doubt cause you many a headache, especially
// when it comes down to hit registration. Other than that, I recommend
// for everyone to use the value `132' (2*66), as long as you can generally
// keep that value stable without regular drops.
// ----------------------------------------------------------------------------
cl_showfps 1 // Show unsmoothed FPS meter
//fps_max 132 // Commented due to 2011-09-02 update causing jittering when fps is capped for some
fps_max 121

// ----------------------------------------------------------------------------
// Net settings
// ----------------------------------------------------------------------------
// Whilst net settings perhaps aren't an integral part of an FPS config, they
// are a fact of life in competitive TF2, and as such, they are included here.
//
// A common question I am asked -- what defines whether a good connection is
// good or bad? Mostly personal preference. If you're not willing to make the
// choice, try both and see which is better for you.
//
// Generally, meeting both of the following conditions would classify it as a
// good connection:
//
// - Ping of <80 to the average server you join
// - Generally no/negligible choke/loss (can be checked with `net_graph')
//
// There's some pretty good documentation on this here:
// http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
//
// Uncomment (remove the `//' from) one of the groups if you want to use them.
// ----------------------------------------------------------------------------

// Good connection
//cl_cmdrate 66
//cl_interp 0
//cl_interp_ratio 1
//cl_lagcompensation 1
//cl_pred_optimize 2
//cl_smooth 0
//cl_smoothtime 0.01
//cl_updaterate 66
//rate 60000

// Bad connection
cl_cmdrate 40
cl_interp 0
cl_interp_ratio 2
cl_lagcompensation 1
cl_pred_optimize 2
cl_smooth 0
cl_smoothtime 0.01
cl_updaterate 40
rate 35000

// ----------------------------------------------------------------------------
// Sprays
// ----------------------------------------------------------------------------
// Bear in mind that these are disabled on war servers due to `sv_pure 2'
// anyway, so if you play competitive TF2, this won't help you.
// ----------------------------------------------------------------------------

// Disable sprays
cl_playerspraydisable 1
r_spray_lifetime 0

// Enable sprays -- uncomment this section if you want these settings
//cl_playerspraydisable 0
//r_spray_lifetime 2

// ----------------------------------------------------------------------------
// Shadows
// ----------------------------------------------------------------------------

// Disable shadows
mat_shadowstate 0
r_shadowmaxrendered 0
r_shadowrendertotexture 0
r_shadows 0

// Enable shadows -- uncomment this section if you want these settings
//mat_shadowstate 1
//r_shadowmaxrendered 11
//r_shadowrendertotexture 1 // Non-blobby shadows. Sometimes turned on by
                            // competitive TF2 players to see opponents standing
                            // near the other side of a wall. You may see some
                            // performance loss from setting this to `1'.
//r_shadows 1

// ----------------------------------------------------------------------------
// Facial features
// ----------------------------------------------------------------------------

// Disable facial features
r_eyes 0
r_flex 0
r_lod 2
r_rootlod 2
r_teeth 0

// Enable facial features -- uncomment this section if you want these settings
//r_eyes 1
//r_flex 1
//r_lod 1 // Needs to be set to 1, otherwise they will still be disabled.
//r_rootlod 1
//r_teeth 1

// ----------------------------------------------------------------------------
// Ragdolls
// ----------------------------------------------------------------------------
// You will have reduced performance on deaths which produce ragdolls.
// ----------------------------------------------------------------------------

// Disable ragdolls
cl_ragdoll_fade_time 0
cl_ragdoll_forcefade 1
cl_ragdoll_physics_enable 0
g_ragdoll_fadespeed 0
g_ragdoll_lvfadespeed 0
ragdoll_sleepaftertime 0

// Enable ragdolls -- uncomment this section if you want these settings
//cl_ragdoll_fade_time 15
//cl_ragdoll_forcefade 0
//cl_ragdoll_physics_enable 1
//g_ragdoll_fadespeed 600
//g_ragdoll_lvfadespeed 100
//ragdoll_sleepaftertime "5.0f"

// ----------------------------------------------------------------------------
// Gibs

1

u/[deleted] Dec 11 '14

A chunk of it is missing since it was too long

1

u/[deleted] Dec 11 '14

its really just crouch, zoom, null m. plus chris fps

1

u/[deleted] Dec 11 '14

sensitivity 5.5

r_drawviewmodel 1

bind w +mfwd
bind s +mback
bind a +mleft
bind d +mright

alias +mfwd "-back;+forward;alias checkfwd +forward"
alias +mback "-forward;+back;alias checkback +back"
alias +mleft "-moveright;+moveleft;alias checkleft +moveleft"
alias +mright "-moveleft;+moveright;alias checkright +moveright"
alias -mfwd "-forward;checkback;alias checkfwd none"
alias -mback "-back;checkfwd;alias checkback none"
alias -mleft "-moveleft;checkright;alias checkleft none"
alias -mright "-moveright;checkleft;alias checkright none"
alias checkfwd none
alias checkback none
alias checkleft none
alias checkright none
alias none ""

alias +crouchjump "+jump; +duck"
alias -crouchjump "-duck; -jump"
bind "space" "+crouchjump"

// viewmodel/combination script binds
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "q" "lastinv"

bind "mouse1" "+attack"
bind "mouse2" "+attack2"


// crosshair script binds
bind "a" "+moveleft"
bind "d" "+moveright"
bind "s" "+back"
bind "w" "+forward"
bind "SPACE" "+jump"
bind “SHIFT” "+duck"

// first you set up the colors and shapes/sizes you want the xhair to toggle through (cl_crosshair_file = type cl_crosshair_scale = size). Keep in mind that the base size of the crosshair varies depending on the weapon: //
// // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // //  //
 
//xhair TYPE toggle--switches crosshair type when shooting; good for preventing Amby xhair from expanding too large (uses my settings as an example). NOTE: Must be manually integrated with viewmodel scripts to work in conjunction.
//=========================================================
alias dotxhairtype "dotxhairtypeb"
alias dotxhairtypeb "cl_crosshair_file crosshair2;cl_crosshair_scale 40;alias dotxhairtype dotxhairtyper" // tweak crosshair_scale values to your liking
alias dotxhairtyper "cl_crosshair_file crosshair5;cl_crosshair_scale 25;alias dotxhairtype dotxhairtypeb"

bind mouse1 +crosshairfire
alias +crosshairfire "+attack;dotxhairtype;spec_next"
alias -crosshairfire "-attack;dotxhairtype"
//=========================================================
 
// xhair COLOR toggle
//=========================================================
alias dotxhaircolor "dotxhaircolorb"
alias dotxhaircolorb "cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorc"
alias dotxhaircolorc "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhaircolor dotxhaircolord"
alias dotxhaircolord "cl_crosshair_blue 240; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorb"
//=========================================================
 
// // // // // // // // // // // // // // // // //
// movement color toggle/flashing xhair example //
// // // // // // // // // // // // // // // // //
 
bind "w" +fw
alias +fw "+forward;dotxhaircolor"
alias -fw "-forward;dotxhaircolor"
 
bind "s" +bw
alias +bw "+back;dotxhaircolor"
alias -bw "-back;dotxhaircolor"
 
bind "d" +mr
alias +mr "+moveright;dotxhaircolor"
alias -mr "-moveright;dotxhaircolor"
 
bind "a" +ml
alias +ml "+moveleft;dotxhaircolor"
alias -ml "-moveleft;dotxhaircolor"

1

u/[deleted] Dec 11 '14

this is what most if not all my class configs look like except for spy

1

u/[deleted] Dec 11 '14

is me having the crouch, zoom, and null m. in all class configs as well as auto exec making them not work? (they didnt work before anyway with them just in autoexec)

1

u/DeltaTroopa Dec 11 '14

I see your problem, you're binding your movement keys multiple times.

bind w +mfwd
bind s +mback
bind a +mleft
bind d +mright


bind "a" "+moveleft"
bind "d" "+moveright"
bind "s" "+back"
bind "w" "+forward"

bind "w" +fw
alias +fw "+forward;dotxhaircolor"
alias -fw "-forward;dotxhaircolor"

bind "s" +bw
alias +bw "+back;dotxhaircolor"
alias -bw "-back;dotxhaircolor"

bind "d" +mr
alias +mr "+moveright;dotxhaircolor"
alias -mr "-moveright;dotxhaircolor"

bind "a" +ml
alias +ml "+moveleft;dotxhaircolor"
alias -ml "-moveleft;dotxhaircolor"

so each one of those is overwriting the previous ones, same with your space key etc, what you need to do is combine all 2? 3? of those scripts into one so they don't conflict with each other (I would also remove them from your class configs because those will overwrite your autoexec every time you change class)

Here is a tutorial on Merging Scripts to get you started, feel free to ask if you have any questions.

1

u/[deleted] Dec 11 '14

if that is the problem why does it work if I type in console "exec autoexec.cfg" the null m. works as well when I do this but the zoom script never EVER works

1

u/[deleted] Dec 11 '14
// crosshair script binds
bind "a" "+moveleft"
bind "d" "+moveright"
bind "s" "+back"
bind "w" "+forward"
bind "SPACE" "+jump"
bind “SHIFT” "+duck"

1

u/[deleted] Dec 11 '14

I also removed this script from all my classes, should this make the scripts in my autoexec work now?

→ More replies

1

u/DeltaTroopa Dec 11 '14 edited Dec 11 '14

Well the way you have the zoom script set up it only works while the ' key is being held down, its not a toggle, which might be your issue with that.

As for the reexecuting the script working I'm really not sure, but you're rebinding your wasd keys so many times I'm not suprised you're getting some odd behavior.

I would also take the all the chris's config stuff and put in a different config file, call it gfx.cfg then just write exec gfx.cfg in your autoexec.

1

u/[deleted] Dec 11 '14

Ok, so far the crouch script is working as u said it would (yay) Zoom script still does not work. But im really confused about what u said with the 2 versions of the null cancleing m. I did what u said with the gfx.xfg thing but im clueless with how to get the null m. to work :/ (THANK YOU SO MUCH T LEAST THE CROUCH SCRIPT WORKS NOW) <3

→ More replies