Add zoom script.

This commit is contained in:
Lyrositor
2014-02-23 12:45:45 +01:00
parent 1f910b6371
commit b07878984a
5 changed files with 42 additions and 9 deletions

View File

@@ -22,11 +22,12 @@ Most features are usable by all classes, but a few are class-specific. If you wo
- **Spy-Checking Lines:** sends a team message notifying players about an exposed spy (e.g. "Pyro is Spy.") by pressing `Shift` + the class' number (1-9).
- **Suicide Explosion:** makes you explode at the touch of a button.
- **Viewmodel Toggling:** toggles display of the active weapon at the press of the `Delete` key.
- **Zooming:** zooms in and out when pressing `F`.
- **Engineer: Building Bindings:** binds keys 6 through 9 to the Engineer's buildings, automatically destroying any existing buildings when pressed. You can also disable the PDAs; doing so will shift the building bindings from 6-9 to 4-7.
- **Soldier: Rocket Jump:** a simple rocket jump script bound to `MOUSE2` when toggled on (use `R` to toggle). Does not provide optimal jump, but is a reliable way to rocket jump. Aim the rocket launcher at the ground before clicking.
- **Spy: Taunt:** automatically un-disguises the Spy before performing a taunt. If pressing `G` once doesn't work for you, always quickly press `G` twice.
- **Spy: Disguise Bindings:** binds key 5 through 9 to some of the Spy's disguises.
- **Spy: Auto Disguise:** automatically disguises the Spy on clicking `MOUSE1`. If this is not desirable (for example, when placing a sapper), use `MOUSE3` to perform a normal left-click. Also automatically changes the disguise's current weapon when actually switching weapons. Press `F` at any time to disable all auto disguise functions.
- **Spy: Auto Disguise:** automatically disguises the Spy on clicking `MOUSE1`. If this is not desirable (for example, when placing a sapper), use `MOUSE3` to perform a normal left-click. Also automatically changes the disguise's current weapon when actually switching weapons. Press `R` at any time to disable all auto disguise functions.
### Settings ###
TF2-Scripts comes with several settings used to disable certain undesired features; edit them in `cfg\_settings.cfg`:
@@ -45,6 +46,9 @@ TF2-Scripts comes with several settings used to disable certain undesired featur
- `SPY_LINES`
- `SPY_TAUNT`
- `SUICIDE_EXPLOSION`
- `ZOOM_IN_HIDE_WEAPON`
- `ZOOM_IN_SENSITIVITY`
- `ZOOM_OUT_SENSITIVITY`
## Installation ##
To install, locate your Team Fortress 2 installation's `custom` folder (usually located at `C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\custom` on Windows), then copy-and-paste the `TF2-Scripts` there.
@@ -59,6 +63,7 @@ The scripts bundled together would not have been possibly were it not for the sc
- INsane for his [developer console font file information](http://www.dodbits.com/dods/index.php/source-graphics/source-gui-hud-tutorials/33-console-font-color-and-size),
- [clovervidia](http://steamcommunity.com/id/clovervidia/) for his [captions tutorials](http://www.reddit.com/r/tf2scripthelp/wiki/captions),
- povohat.au for his [null-cancelling script](http://ozfortress.com/showpost.php?p=624355),
- stabby stabby for his [zoom script](http://steamcommunity.com/groups/stabbyvideo/discussions/0/846963165458399532/),
- josh33901 for his rocket jump suggestion.
As best as I can recall, all other scripts are written by me, using various tutorials and my own discoveries. If you feel your script was not credited, or you want me to cease distributing your script, send me a message and I will either add credit where it is due or remove your script.

View File

@@ -23,5 +23,7 @@ alias key8 slot8; bind 8 key8
alias key9 slot9; bind 9 key9
// Reset any other affected keys.
bind F inspect
bind R +reload
// Return to the default zoom.
zoom_out

View File

@@ -75,7 +75,7 @@ alias SPY_LINES "spy_lines_on"
// SPY_TAUNT
// Values: spy_taunt_on | spy_taunt_off
// If set to spy_taunt_on, pressing G will un-disguise the Spy and make him
// If set to spy_taunt_on, pressing G will un-disguise the Spy and make himb
// perform a taunt. Press G twice to ensure that the taunt is always performed.
alias SPY_TAUNT "spy_taunt_on"
@@ -83,3 +83,18 @@ alias SPY_TAUNT "spy_taunt_on"
// Values: suicide_on | suicide_off
// If set to suicide_on, pressing F1 will make the player explode.
alias SUICIDE_EXPLOSION "suicide_on"
// ZOOM_IN_HIDE_WEAPON
// Values zoom_hide_on | zoom_hide_off
// If set to zoom_hide_on, hides the weapon's viewmodel when zoomed in.
alias ZOOM_IN_HIDE_WEAPON "zoom_hide_on"
// ZOOM_IN_SENSITIVITY
// Values: sensitivity [0.00 - 6.00]
// The mouse sensitivity when zoomed in.
alias ZOOM_IN_SENSITIVITY "sensitivity 2.00"
// ZOOM_OUT_SENSITIVITY
// Values: sensitivity [0.00 - 6.00]
// The mouse sensitivity when zoomed out.
alias ZOOM_OUT_SENSITIVITY "sensitivity 6.00"

View File

@@ -159,3 +159,14 @@ alias viewmodel_on "r_drawviewmodel 1; alias toggle_viewmodel viewmodel_off"
alias viewmodel_off "r_drawviewmodel 0; alias toggle_viewmodel viewmodel_on"
alias toggle_viewmodel viewmodel_off
bind DEL toggle_viewmodel
// Zoom Script
// Changes the FOV to zoom in/zoom out when pressing F.
alias zoom_hide_on "alias zoom_hide viewmodel_off"
alias zoom_hide_off "alias zoom_hide viewmodel_on"
alias zoom_in "fov_desired 20; viewmodel_fov 20; viewmodel_fov_demo 20; ZOOM_IN_SENSITIVITY; zoom_hide; alias toggle_zoom zoom_out"
alias zoom_out "fov_desired 90; viewmodel_fov 54; viewmodel_fov_demo 54; ZOOM_OUT_SENSITIVITY; viewmodel_on; alias toggle_zoom zoom_in"
alias toggle_zoom zoom_in
bind F toggle_zoom
ZOOM_IN_HIDE_WEAPON

View File

@@ -34,7 +34,7 @@ alias key9 "disguise 8 -2; disguise_remove_text" // Un-disguise
// Auto-Disguise After Attack
// Press F to activate.
// Press R to activate.
alias disguise1 "disguise 4 -1; disguise_demoman_text; alias next_disguise disguise2" // Demoman
alias disguise2 "disguise 7 -1; disguise_pyro_text; alias next_disguise disguise3" // Pyro
alias disguise3 "disguise 2 -1; disguise_sniper_text; alias next_disguise disguise4" // Sniper
@@ -64,9 +64,9 @@ bind MWHEELDOWN scroll_down
// Disguise Toggling
// The master switch for all the automatic disguise scripting. Default: on
alias spy_toggle disguise_off
alias disguise_on "auto_disguise_on_text; disguise_weapon_on; bind MOUSE1 +disguise_attack; alias spy_toggle disguise_off"
alias disguise_on "cl_autoreload 1; auto_disguise_on_text; disguise_weapon_on; bind MOUSE1 +disguise_attack; alias spy_toggle disguise_off"
alias disguise_off "auto_disguise_off_text; disguise_weapon_off; bind MOUSE1 +attack; alias spy_toggle disguise_on"
bind F spy_toggle
bind R spy_toggle
// MOUSE3 Attack