SHARE
TWEET

Default slot-specific settings

a guest Dec 14th, 2015 432 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This script allows settings to switch with the active weapon.
  2. // Only the first 3 slots will be tracked by the scroll wheel and q, specifically this excludes the disguise kit (Spy) and the PDAs (Engineer).
  3. // Medic, Spy, Engineer, and permanent non-active weapon versions are also available, contact the author below.
  4.  
  5. // The script will only work correctly when switching with keys bound to the defined eq_ aliases, as in the BIND section.
  6. // The script cannot know if a weapon switched for any other reason than direct player input using the keys in the BIND section.
  7. // The script cannot know if a weapon switched successfully, and will always assume it has.
  8. // Examples that prevent/impede switching:
  9. //  - Permanent or temporary non-active weapons like gunboats or a melted spy-cicle
  10. //  - Minigun spinup/spindown
  11.  
  12.  
  13. // Written by /u/genemilder (http://steamcommunity.com/id/Seventy_one)
  14.  
  15.  
  16. // ========== INSTRUCTIONS ==========
  17.  
  18. // Use the SETTINGS section to add/remove/edit any and all slot-specific settings.
  19.  
  20. // Settings in the prs_ aliases are activated when pressing the attack key with the weapon slot equipped.
  21. // Settings in the rls_ aliases are activated when releasing the attack key with the weapon slot equipped.
  22. // Settings in the set_ aliases are activated when switching to that weapon slot.
  23.  
  24. // To add additional settings on weapon switch,  append them to the set_ aliases.
  25. // To add additional settings on attack/release, append them to the prs_/rls_ aliases.
  26.  
  27. // Edit r_drawviewmodel in the SETTINGS section for whether viewmodels are turned on (1) or off (0).
  28.  
  29. // To change which keys can switch weapons, change or add lines in the BINDS section, binding new keys only to the eq_ aliases already used in the binds section.
  30. // Multiple keys can be bound to the same alias and the script will still work correctly.
  31.  
  32. // See the following for information on how to install scripts and how to make them class-specific:
  33. // http://www.reddit.com/r/tf2scripthelp/wiki/introduction
  34.  
  35. // To "undo" the script and changes made, remove the script from your relevant cfg files and execute the lines in the SCRIPT OVERWRITE section (remove the comment marks first).
  36.  
  37.  
  38. // ========== BINDS ==========
  39.  
  40. bind 1             eq_slot1
  41. bind 2             eq_slot2
  42. bind 3             eq_slot3
  43. bind mwheelup      eq_invprev
  44. bind mwheeldown    eq_invnext
  45. bind q             eq_lastinv
  46. bind mouse1       +eq_attack
  47.  
  48.  
  49. // ========== SETTINGS ==========
  50.  
  51. alias prs_slot1   "r_drawviewmodel 1"
  52. alias rls_slot1   "r_drawviewmodel 1"
  53. alias prs_slot2   "r_drawviewmodel 1"
  54. alias rls_slot2   "r_drawviewmodel 1"
  55. alias prs_slot3   "r_drawviewmodel 1"
  56. alias rls_slot3   "r_drawviewmodel 1"
  57.  
  58. alias set_slot1   "r_drawviewmodel 1"
  59. alias set_slot2   "r_drawviewmodel 1"
  60. alias set_slot3   "r_drawviewmodel 1"
  61.  
  62.  
  63. // ========== LOGIC ==========
  64.  
  65. alias +eq_attack  "+attack; at_prs; spec_next"`
  66. alias -eq_attack  "-attack; at_rls"
  67.  
  68. alias eq_slot1    "slot1; set_slot1; alias at_prs prs_slot1; alias at_rls rls_slot1; alias eq_invnext eq_slot2; alias eq_invprev eq_slot3; qs_slot1; alias set_lastinv alias eq_lastinv eq_slot1; alias qs_slot1 ;            alias qs_slot2 set_lastinv; alias qs_slot3 set_lastinv"
  69. alias eq_slot2    "slot2; set_slot2; alias at_prs prs_slot2; alias at_rls rls_slot2; alias eq_invnext eq_slot3; alias eq_invprev eq_slot1; qs_slot2; alias set_lastinv alias eq_lastinv eq_slot2; alias qs_slot1 set_lastinv; alias qs_slot2 ;            alias qs_slot3 set_lastinv"
  70. alias eq_slot3    "slot3; set_slot3; alias at_prs prs_slot3; alias at_rls rls_slot3; alias eq_invnext eq_slot1; alias eq_invprev eq_slot2; qs_slot3; alias set_lastinv alias eq_lastinv eq_slot3; alias qs_slot1 set_lastinv; alias qs_slot2 set_lastinv; alias qs_slot3 "
  71.  
  72. eq_slot1
  73. alias eq_lastinv   eq_slot2
  74.  
  75.  
  76. // ========== SCRIPT OVERWRITE ==========
  77.  
  78. //r_drawviewmodel  1
  79. //bind 1           slot1
  80. //bind 2           slot2
  81. //bind 3           slot3
  82. //bind mwheelup    invprev
  83. //bind mwheeldown  invnext
  84. //bind q           lastinv
  85. //bind mouse1      +attack
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top