Urik's 3rdPersonView (back!)

third-person view config for Left 4 Dead & Left 4 Dead 2


// Urik's 3rdPerson config (L4D 1&2). ver.1.1
// Behind View
// To change the distance that Behind View activates with (from 1st person), change cam_idealdist value (limited by c_mindistance and c_maxdistance values).
alias +lookbehind "firstperson; thirdpersonshoulder; cam_collision 1; crosshair 0; cam_idealyaw 180; alt@bv_dist; alias 3rdpersonview 3rdpersonoff"
alias -lookbehind "firstperson; cam_idealyaw 0; crosshair 1; alt@normal; alias 3rdpersonview 3rdpersonon"
alias +RMB_bview "+use; -attack2; RMB@behind"
alias -RMB_bview "-lookbehind; RMB@normal; -use"
alias -lookbehind3rd "crosshair 1; cam_idealyaw 0; alt@3rd"
alias +lookbehind3rd "crosshair 0; cam_idealyaw 180; alt@bv_dist"
alias -lookbehind3rdE "cam_idealyaw 0"
alias +lookbehind3rdE "cam_idealyaw 180"
// 3rdPerson View
// To change the distance that 3rdPersonShoulder activates with (from 1st person), change cam_idealdist value (limited by c_mindistance and c_maxdistance values).
alias 3rdpersonview 3rdpersonon
alias 3rdpersonon "e@3rd; alt@3rd; mouseextra1@lookbehind3rd; mouseextra2@default; cam_idealdist 150; cam_collision 1; thirdpersonshoulder; crosshair 1; alias 3rdpersonview 3rdpersonoff"
alias 3rdpersonoff "firstperson; -zin; -zout; -s360left; -s360right; cam_idealyaw 0; e@bview; alt@normal; mouseextra2@default; mouseextra1@lookbehind; alias 3rdpersonview 3rdpersonon"
alias +3rd_use "+use; -attack2; +smooth360; +activate360; alt@3rd360"
alias -3rd_use "-lookbehind3rdE; -smooth360; -activate360; -use; alt@3rd"
// Distance changer (zoom in / out) for 3rdperson View.
alias +3rd_dist "-zin; -zout; mouseextra@distance; bind mwheelup "3rd_zoomin"; bind mwheeldown "3rd_zoomout"
alias -3rd_dist "mouseextra1@lookbehind3rd; mouseextra2@default; -zin; -zout; bind mwheelup "invprev"; bind mwheeldown "invnext"
alias +3rd_dist_360 "-zin; -zout; -s360left; -s360right; mouseextra@distance; bind mwheelup "3rd_zoomin"; bind mwheeldown "3rd_zoomout"
alias -3rd_dist_360 "mouseextra@s360; bind mwheelup "360right"; bind mwheeldown "360left"
alias 3rd_zoomin "incrementvar cam_idealdist 30 200 -10"           // by changing delta (last digit), you can change distance change amount per single mousewheel turn.     
alias 3rd_zoomout "incrementvar cam_idealdist 30 200 10"           // by changing delta (last digit), you can change distance change amount per single mousewheel turn. 
alias +bv_dist "bind mwheelup "3rd_zoomin"; bind mwheeldown "3rd_zoomout"
alias -bv_dist "bind mwheelup "invprev"; bind mwheeldown "invnext"// Smooth
// Smooth in/out (mouse4&mouse5)
alias +zin "+zin1"
alias -zin "alias +zin ""; wait; alias +zin +zin1"
alias +zout "+zout1"
alias -zout "alias +zout ""; wait; alias +zout +zout1"
alias +zin1 "zoomin; wait; +zin"                                  // BY ADDING MORE "zoomin" BEFORE "wait", YOU'LL INCREASE ZOOM IN SPEED.
alias +zout1 "zoomout; wait; +zout"                               // BY ADDING MORE "zoomout" BEFORE "wait", YOU'LL INCREASE ZOOM OUT SPEED.
alias zoomin "incrementvar cam_idealdist 30 200 -1"
alias zoomout "incrementvar cam_idealdist 30 200 1"
// 360 View of 3rdPerson View
alias +activate360 "crosshair 0; cam_idealyaw 0; RMB@behind3rd; bind mwheelup "360right"; bind mwheeldown "360left"
alias -activate360 "crosshair 1; cam_idealyaw 0; RMB@normal; bind mwheelup "invprev"; bind mwheeldown "invnext"
alias 360left "incrementvar cam_idealyaw -359 359 15"            // by changing delta (last digit), you can change degree of rotate per single mousewheel turn.     
alias 360right "incrementvar cam_idealyaw -359 359 -15"          // by changing delta (last digit), you can change degree of rotate per single mousewheel turn. 
// Smooth 360 (mouse4&mouse5).
alias +smooth360 "mouseextra@s360; -zin; -zout"
alias -smooth360 "mouseextra1@lookbehind3rd; mouseextra2@default; -s360left; -s360right"
alias +s360right "+s360right1"
alias -s360right "alias +s360right ""; wait; alias +s360right +s360right1"
alias +s360left "+s360left1"
alias -s360left "alias +s360left ""; wait; alias +s360left +s360left1"
alias +s360right1 "smooth360right; smooth360right; smooth360right; wait; +s360right"       // BY ADDING / REMOVING "smooth360right", YOU CAN ADJUST CAMERA ROTATE SPEED.
alias +s360left1 "smooth360left; smooth360left; smooth360left; wait; +s360left"            // BY ADDING / REMOVING "smooth360left", YOU CAN ADJUST CAMERA ROTATE SPEED.
alias smooth360left "incrementvar cam_idealyaw -359 359 1"
alias smooth360right "incrementvar cam_idealyaw -359 359 -1"
// Aliased binds
// Right Mouse Button (don't rebind)
alias RMB@normal "bind "mouse2" "+attack2"                                // this restores right mouse button normal function
alias RMB@behind "bind mouse2 "+lookbehind"                               // this binds right mouse button to activate Behind View when "E" is held
alias RMB@behind3rd "bind mouse2 "+lookbehind3rdE"                        // this binds right mouse button to activate Behind View in 3rdPerson View when "E" is held
// Use key (don't rebind)
alias e@3rd "bind e "+3rd_use"                                            // this makes "E" button enable "360 view" for 3rdPerson View when held
alias e@bview "bind e "+RMB_bview"                                        // this binds "E" to work in combo with "RMB" for Behind View
// "ALT" (can be re-binded)
alias alt@normal "unbind "Alt"                                            // normal state for "Alt". Put your "normal" "Alt" binding here
alias alt@3rd "bind Alt "+3rd_dist"                                       // binds "Alt" to activate 3rdperson distance setup when held
alias alt@bv_dist "bind Alt "+bv_dist"                                    // binds "Alt" to activate distance setup while in Behind View
alias alt@3rd360 "bind Alt "+3rd_dist_360"                                // binds "Alt" to activate distance setup while "E" is held
// mouse4 & mouse5 (can be re-binded)
alias mouseextra@distance "bind mouse4 "+zin"; bind mouse5 "+zout"        // binds mouse4 and mouse5 to work as distance in/out in 3rdPerson View
alias mouseextra@s360 "bind mouse4 "+s360right"; bind mouse5 "+s360left"  // binds mouse4 and mouse5 to work as "Smooth 360" rotate in 360 View
alias mouseextra1@lookbehind "bind mouse5 "+lookbehind"                   // this binds mouse5 to activate Behind View when held
alias mouseextra1@lookbehind3rd "bind mouse5 "+lookbehind3rd"             // this binds mouse5 to activate Behind View in 3rdPerson View when held
alias mouseextra2@default "UNBIND MOUSE4"                                 // bind your default mouse4 function here
// 3rdPerson View key
bind "V" "3rdpersonview"                                                  // Toggles 3rdperson View on/off.

// Other cvars needed to insure normal work.
c_thirdpersonshoulderheight 0 //height
c_thirdpersonshoulderoffset 0
c_thirdpersonshoulderdist 150 //doesn't really change anything
c_thirdpersonshoulderaimdist 150 //doesn't really change anything
cam_idealdelta 0
cam_ideallag 0 //camera lag
cam_idealpitch 0
cam_snapto 0
c_minpitch 0
c_maxpitch 90
c_mindistance 30 //min value allowed for cam_idealdist
c_maxdistance 200 //max value allowed for cam_idealdist
c_minyaw -359 //min value allowed for cam_idealyaw
c_maxyaw 359 //max value allowed for cam_idealyaw
3rdpersonoff //necessary

echo
echo [3rdperson config loaded]
echo

Note: This doesn't work in Versus/Scavenge.


Info: script uses following keys:
"V" - toggle 3rdPerson View on/off
"mouse5" - used for "press&hold" Behind View from both 1stperson and 3rdperson Views plus for distance setup and 360 View.
"mouse4" - used for distance setup and 360 View.
"Alt" - "press&hold" activates distance setup in 3rdperson and Behind View.
"mouse2" - in some cases re-binded for special action, otherwise performs its original function.
"E" - activates some features, without loss of its original function.
"mousewheel" - in some cases used for distance setup or 360 View, otherwise performs its original function.
Keys can be re-binded in binds section of the script; except specific "E" and "mouse2", because their actions are merged with native actions.
Each key has several aliased bind states. Actions commented.


Features:
>3rdPerson View
Default thirdpersonshoulder with 150p distance.
>3rdPerson Distance Changer
Allows to zoom closer/away from bot model using mousewheel or mouse4&mouse5 in 3rdPerson View and BehindView (in BehindView only mousewheel).
>Behind View
is a mirrored 3rdPersonView. You see your bot model from 150p distance from front. Works in both 1stperson and 3rdpersonshoulder. Crosshair off.
>360 View of 3rdPersonShoulder
Allows to rotate camera around the bot model using mousewheel or mouse4&mouse5. Crosshair off.

Working scheme (all combinations)

As side effect of merged "E" functions, game instructor may not correctly show key hints.

Installation: copypaste to separate file or autoexec.cfg and make so that game executes it on launch.

NOTE: shotguns don't make firing sound in thirdpersonshoulder. This bug stayed since L4D1 release.




Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Script.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Script a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Script.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

  • AmazingRed's Levels
    • A4: Graduate
      Account Age: 4 years
    Posted 4 years ago

    Okay, So I used this script so far the most accurate i've seen. I don't like how it unbinds certain keys and how it binds for others, such as mouse 4-5 (which I use for other things)I'm not too crazy for the odd camera views. pretty much I like thirdpersonshoulder as Valve made it except the accuracy which you've done perfectly.I'm very impressed by it, but it needs a few tweaking. Oh and any chance you could create another script that is more basic which just improved accuracy. Seriously It's impressive how accurate it is. Blows my mind.Great work.

    "Fuck You Yankee Blue Jeans"

Credits

Submitter
Urik_Kane's Levels
  • P2: Drudge
    Points: 2,182
  • A5: Veteran
    Account Age: 4 years
Urik_Kane (Creator/Co-creator)
Key Authors
Urik_Kane
scripting

Rating

9.71/10
Based off 1 rating(s)

Stats

Post Count
1
ViewCount
4,473
Date Added
4 years ago
Date Modified
3 years ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share