Difference between revisions of "Scripting/ko"

From Team Fortress Wiki
Jump to: navigation, search
m (Aliases, Alias 에 대해서 '이름 변경' 및 '다른 기타' 명칭 사용을 생각해보았지만, 프로그래머들조차 Alias에 대한 정확한 번역을 하지않습니다. 그러므로 일단 '앨리어스' 로 수정해두겠습니다.)
 
m
Line 10: Line 10:
  
 
These scripts range in complexity from simple lists of commands to self-referential loops and nested aliases that redefine one another. With enough time and effort, you can use these tools to create almost any behavior available to the client at the press of a single key.
 
These scripts range in complexity from simple lists of commands to self-referential loops and nested aliases that redefine one another. With enough time and effort, you can use these tools to create almost any behavior available to the client at the press of a single key.
 +
스크립트로 건드릴 수 있는 범위는 간단한듯 보이지만 다양하면서도 자기지시적 반복들과 앨리어스 집합들을 정의할 수 있습니다. 당신이 조금의 시간과 노력만 들인다면, 스크립트 툴을 이용하여 키 하나를 누름으로써 당신이 몰랐던 클라이언트 뒤의
  
 
==기본 스크립팅 파일들==
 
==기본 스크립팅 파일들==
''Team Fortress 2'' automatically reads several game files and executes any keybinds and aliases within them. Here is the list of those files:
 
 
''Team Fortress 2'' 에서는 각자 게임 파일에 맞추어 키 수정 그리고 앨리어스를 자동으로 읽어옵니다. 자동으로 읽어오는 파일의 목록입니다.
 
''Team Fortress 2'' 에서는 각자 게임 파일에 맞추어 키 수정 그리고 앨리어스를 자동으로 읽어옵니다. 자동으로 읽어오는 파일의 목록입니다.
  
* config.cfg - This is the default config file which the game edits whenever you use the in-game menus to bind keys or change video settings. While editing the file is safe, it's simpler to leave it alone. It should also be noted that anything changed in another .cfg is also changed in the config.cfg file.
+
* config.cfg - 이 기본설정 파일은 게임 안에서 비디오 설정을 변경하거나 키를 변경할 수 있습니다. 이 파일을 수정하는 동안에는 안전하며, 그냥 그대로 두는것이 가장 간단합니다. 다른 .cfg파일이 변경될 경우 config.cfg 파일 안에 기록도 가능합니다.
  
 
* autoexec.cfg - This is the default config file for executing custom keybinds and aliases. You may put your keybinds directly into this file, but it is often easier to create separate .cfg files for different scripts, which you then execute within this file.
 
* autoexec.cfg - This is the default config file for executing custom keybinds and aliases. You may put your keybinds directly into this file, but it is often easier to create separate .cfg files for different scripts, which you then execute within this file.
  
* <class>.cfg - Each class has a config file which automatically runs whenever you switch to that class. You may put your keybinds directly into this file, but it is often easier to create separate .cfg files for different scripts, which you then execute within these files.
+
* <클래스>.cfg - Each class has a config file which automatically runs whenever you switch to that class. You may put your keybinds directly into this file, but it is often easier to create separate .cfg files for different scripts, which you then execute within these files.
  
 
==문법==
 
==문법==
Here is a list of syntactic rules:
+
여기 문법 규칙이 있습니다.
  
* For any keybind or alias to work, you need to follow this format:
+
* 키 편집과 앨리어스가 작동하기 위해서는 아래와 같은 문법이 필요합니다.:
  
:'''command <argument1> <argument2>'''
+
:'''명령어 <구문1> <구문2>'''
  
:* command is the kind of scripting you want. You have three choices:
+
:* 명령어에는 스크립팅 가능한 세가지 명령어들이 있습니다.
  
::* bind - Used to bind commands to a particular key.
+
::* bind - bind 명령어를 사용하면 해당 키의 역할을 지정할 수 있습니다.
 
::* alias - Used to execute commands when the alias is executed.
 
::* alias - Used to execute commands when the alias is executed.
 
::* exec - Used to execute commands automatically when a configuration file is loaded.
 
::* exec - Used to execute commands automatically when a configuration file is loaded.
Line 38: Line 38:
 
:* <argument2> is either the command being bound or the commands executed by the alias.
 
:* <argument2> is either the command being bound or the commands executed by the alias.
  
*To run multiple commands, you must put the entire argument in quotation marks and separate the commands with semicolons, like so:
+
*명령어를 여러개 돌리고싶을 경우엔, 명령어가 끝나는 지점마다 세미콜론(;)을 넣습니다. 예제는 아래와 같습니다.
  
 
:'''alias "spraynpray" "+attack; wait 500; -attack"'''
 
:'''alias "spraynpray" "+attack; wait 500; -attack"'''
Line 258: Line 258:
 
  7. make -Loop clear Loop2's link, breaking the loop.
 
  7. make -Loop clear Loop2's link, breaking the loop.
  
== Useful script commands ==
+
== 유용한 스크립트 명령어들 ==
 
There are literally hundreds of different arguments for your script that can make them do almost anything. Here's a list of a few of them.
 
There are literally hundreds of different arguments for your script that can make them do almost anything. Here's a list of a few of them.
  
===Voice commands===
+
===음성 명령어===
 
A '''voice command''' is the act of making your class say something, often used in gameplay as a way of either signaling information or just for goofing-off.
 
A '''voice command''' is the act of making your class say something, often used in gameplay as a way of either signaling information or just for goofing-off.
  
Line 270: Line 270:
 
Where <menu_number> is the one of the 3 menus where voice commands are spread out through <phrase_number> is one of the 7 voice commands that are within each <menu_number> menu.
 
Where <menu_number> is the one of the 3 menus where voice commands are spread out through <phrase_number> is one of the 7 voice commands that are within each <menu_number> menu.
  
====Arguments for voice commands====
+
====음성 명령어를 위한 구문====
 
*0 <phrase_number>
 
*0 <phrase_number>
*:0: Medic
+
*:0: 메딕
 
*:1: Thanks
 
*:1: Thanks
 
*:2: Go
 
*:2: Go
Line 299: Line 299:
 
*:7: Good Job
 
*:7: Good Job
  
===Quick Spy disguises===
+
===빠른 스파이 변장===
 
With these quick and easy commands, you can bind keys to specific disguises instead of having to flip through the disguise menu.
 
With these quick and easy commands, you can bind keys to specific disguises instead of having to flip through the disguise menu.
  
Line 414: Line 414:
 
Some players prefer different mouse sensitivities and control schemes for some classes. (For example, changing from the Demoman, which doesn't require fine aiming, to the Sniper, which encourages low sensitivity for precise aiming so that a hand twitching inadvertently won't ruin a player's aim too much) These scripts alter control schemes and mouse settings on a per class, or even per weapon, basis.
 
Some players prefer different mouse sensitivities and control schemes for some classes. (For example, changing from the Demoman, which doesn't require fine aiming, to the Sniper, which encourages low sensitivity for precise aiming so that a hand twitching inadvertently won't ruin a player's aim too much) These scripts alter control schemes and mouse settings on a per class, or even per weapon, basis.
  
====Charge Dash Scripts====
+
====차지 대시 스크립트====
 
Since timing a charge and jump can be difficult, some players may use a quick script that binds the two actions to a button so that the charge dash will cover the maximum amount of distance possible. The player is still required to swing their melee weapon normally to end the charge though.
 
Since timing a charge and jump can be difficult, some players may use a quick script that binds the two actions to a button so that the charge dash will cover the maximum amount of distance possible. The player is still required to swing their melee weapon normally to end the charge though.
  
Line 432: Line 432:
 
==외부 항목==
 
==외부 항목==
 
*[http://forums.steampowered.com/forums/showthread.php?t=709568 스팀 유저포럼 - TF2 스크립팅 튜토리얼]. 스크립트의 기초에 관하여 다루고 있으며, 많고 실용적이며 이해하기 쉬운 예제들이 있습니다.
 
*[http://forums.steampowered.com/forums/showthread.php?t=709568 스팀 유저포럼 - TF2 스크립팅 튜토리얼]. 스크립트의 기초에 관하여 다루고 있으며, 많고 실용적이며 이해하기 쉬운 예제들이 있습니다.
*[http://warriornation.net/Forum/showthread.php?t=568008 TF2 scripting tutorial - Warrior Nation Network]. This is a much more advanced article, which requires pre-requisite knowledge of the basic scripting syntax.  
+
*[http://warriornation.net/Forum/showthread.php?t=568008 TF2 scripting tutorial - Warrior Nation Network]. 한층 수준이 높은 게시글로, 기본적으로 스크립팅 문법 이해가 전제로 깔려있습니다.
*[http://www.gamebanana.com/scripts/games/297 Gamebanana.com - TF2 scripts]. Hundreds of scripting examples for TF2.
+
*[http://www.gamebanana.com/scripts/games/297 Gamebanana.com - TF2 scripts]. 팀 포트리스2를 위한 수백개의 스크립트 예제들.
  
 
[[Category:Customization/ko]]
 
[[Category:Customization/ko]]

Revision as of 16:46, 26 June 2012

스크립팅은 설정 파일(.cfg)를 이용하여 콘솔에서 사용하는 명령어들로 키 변경 그리고 새로운 명령을 자동으로 입력해주는 방식입니다.

  • 키 변경은 해당 키가 콘솔 명령어에 연결 되어있어야하며, 무기슬롯을 선택하거나 채팅 매크로를 작성 가능합니다.
  • 앨리어스는 콘솔에서 사용하는 명령어들을 추출하여 새로운 명령어를 만들어냅니다. 앨리어스는 앉기뛰기의 개인 명령어들을 하나로 통합하여 앉으면서 뛰기명령어를 만들 수 있습니다. 이는 키를 수정하는 것으로도 가능합니다.

These scripts range in complexity from simple lists of commands to self-referential loops and nested aliases that redefine one another. With enough time and effort, you can use these tools to create almost any behavior available to the client at the press of a single key. 스크립트로 건드릴 수 있는 범위는 간단한듯 보이지만 다양하면서도 자기지시적 반복들과 앨리어스 집합들을 정의할 수 있습니다. 당신이 조금의 시간과 노력만 들인다면, 스크립트 툴을 이용하여 키 하나를 누름으로써 당신이 몰랐던 클라이언트 뒤의

기본 스크립팅 파일들

Team Fortress 2 에서는 각자 게임 파일에 맞추어 키 수정 그리고 앨리어스를 자동으로 읽어옵니다. 자동으로 읽어오는 파일의 목록입니다.

  • config.cfg - 이 기본설정 파일은 게임 안에서 비디오 설정을 변경하거나 키를 변경할 수 있습니다. 이 파일을 수정하는 동안에는 안전하며, 그냥 그대로 두는것이 가장 간단합니다. 다른 .cfg파일이 변경될 경우 config.cfg 파일 안에 기록도 가능합니다.
  • autoexec.cfg - This is the default config file for executing custom keybinds and aliases. You may put your keybinds directly into this file, but it is often easier to create separate .cfg files for different scripts, which you then execute within this file.
  • <클래스>.cfg - Each class has a config file which automatically runs whenever you switch to that class. You may put your keybinds directly into this file, but it is often easier to create separate .cfg files for different scripts, which you then execute within these files.

문법

여기 문법 규칙이 있습니다.

  • 키 편집과 앨리어스가 작동하기 위해서는 아래와 같은 문법이 필요합니다.:
명령어 <구문1> <구문2>
  • 명령어에는 스크립팅 가능한 세가지 명령어들이 있습니다.
  • bind - bind 명령어를 사용하면 해당 키의 역할을 지정할 수 있습니다.
  • alias - Used to execute commands when the alias is executed.
  • exec - Used to execute commands automatically when a configuration file is loaded.
  • <argument1> is either the key being bound or the name of the alias being created.
  • <argument2> is either the command being bound or the commands executed by the alias.
  • 명령어를 여러개 돌리고싶을 경우엔, 명령어가 끝나는 지점마다 세미콜론(;)을 넣습니다. 예제는 아래와 같습니다.
alias "spraynpray" "+attack; wait 500; -attack"
bind "mouse3" "spraynpray"
  • When executed, the alias starts firing the player's weapon, continues for 500 physics frames (that is roughly five seconds if you are on a server that runs at a 100 frames per second), and then stops firing. The alias is keybound to execute when you press the middle mouse button.
  • If the set of commands in quotation marks itself contains quotation marks, you must escape the internal quotes by using a double-set of quotation marks ("") instead. Otherwise, the command is likely to be misinterpreted.


키 수정

Team Fortress 2 allows scripts and aliases to be bound to any key on the keyboard. The key you wish to bind a command to is placed after your bind command and before the action you want the key to execute, as in the section above. Most keys are self-explanatory, as all alphanumerics (a-z, 0-9) and function keys are simply listed by typing that key ("bind a" binds a key to 'a', "bind 5" binds to '5' and "bind F7" binds to 'F7'). Other keys require you type specific names into your .cfg file in order to access them, and these names are not all obvious. A list of these keys is provided below:

키 이름들

  • Keyboard Keys: Names of Keybinds
  • 왼쪽 쉬프트: SHIFT
  • 왼쪽 컨트롤: CTRL
  • 왼쪽 알트: ALT
  • 오른쪽 쉬프트: RSHIFT
  • 오른쪽 컨트롤: RCTRL
  • 오른쪽 알트: RALT
  • 탭: TAB
  • 뒤로가기: BACKSPACE
  • 세미콜론(;): SEMICOLON
  • ---
  • 삽입(Insert): INS
  • 스크롤 락(Scroll Lock): SCROLLLOCK
  • Pause/Break: NUMLOCK
  • ---
  • Home: HOME
  • End: END
  • Delete: DEL
  • Page Up: PGUP
  • Page Down: PGDN
  • ---
  • Up Arrow: UPARROW
  • Down Arrow: DOWNARROW
  • Left Arrow: LEFTARROW
  • Right Arrow: RIGHTARROW
  • ---
  • 숫자패드 키들: Names of Keybinds
  • 0: KP_INS
  • 1: KP_END
  • 2: KP_DOWNARROW
  • 3: KP_PGDN
  • 4: KP_LEFTARROW
  • 5: KP_5
  • 6: KP_RIGHTARROW
  • 7: KP_HOME
  • 8: KP_UPARROW
  • 9: KP_PGUP
  • Enter: KP_ENTER
  • ".": KP_DEL
  • "+": KP_PLUS
  • "-": KP_MINUS
  • "*": KP_MULTIPLY
  • "/":KP_SLASH
  • ---
  • Mouse Wheel Direction: Names of Keybinds
  • Mouse Wheel Up: MWHEELUP
  • Mouse Wheel Down: MWHEELDOWN
  • Mouse Left Click: MOUSE1
  • Mouse Right Click: MOUSE2
  • Mouse Wheel Click: MOUSE3
  • Mouse Left Side Click: MOUSE4
  • Mouse Right Side Click: MOUSE5

Using the above keynames, you are able to place the following example command into one of your config files: <bind KP_ENTER "voicemenu 0 1">. When you hit 'Enter' on your numpad in-game, you will trigger the "Thanks" voice command.

기본 명령어

Most commands accept a single argument, which is whatever value you want to execute.

bind "q" "sv_alltalk 1"

A handful of important commands accept multiple arguments. Here are some examples:

  • disguise X Y - This disguises the Spy. X is the class numbered 1 through 9, while Y is the team numbered 1 or 2.
  • voicemenu X Y - This executes a voice command. X is the number of the primary menu, while Y is the command position in that menu.

Example: "voicemenu 1 1" is the command for Spy, so:

bind "t" "voicemenu 1 1"

This command will make your character yell Spy whenever you hit the key.

Incrementvar

This command cycles through a range of specified values whenever it executes and applies those values to another command. This has the form of:

command "<argument1>" "incrementvar <argument2> X Y Z"
  • X and Y represent the range of values you want to execute with <argument2>.
  • Z is the size of the step you want to make while you cycle through the range.

If you wanted a value range of 1 through 10 and you wanted to increment your value by 2 each time the command was executed, you'd make X Y Z into 1 10 2. Each time it executes, <argument2> will execute with an incrementing value of 2, 4, 6, 8, 10, 2, 4, 6, 8, 10... and so forth.

Here is a real example of incrementvar in action:

bind "n" "incrementvar net_graphpos 1 3 1"

This binds the key "n" to cycle to the next position in the 3 available net_graph positions.

+ 와 - 명령어

These commands have two states. While the bound key is pressed, the + command executes and continues to execute. When the key is released, the - command executes and continues to execute.

Example:

bind "c" "+duck"

This + command is bound to "c" so whenever the key is pressed, the player ducks. Whenever the key is released, "+duck" is swapped to "-duck" and the player stops ducking.

In general, if a command or alias is bound to a key, a + tells the game to run the command as long as the key is held. Similarly, if a command or alias is bound to a key, a - tells the game to run the command when the key is released.

If an alias is defined with a + in front of it, the alias will be run whenever the key is pressed, as the key is pressed. The - command will then run as the key is released.

대기 명령어

If you want the game to delay for a period of time during an alias, or if you want to avoid client crashes caused by executing commands too quickly, use the wait command.

The wait command tells the game to delay the next command in the script by one physics frame, something like a full turn in the TF2 rules. It accepts values such as "wait 50", telling the game to wait fifty frames before the alias continues. "wait 100" is roughly a second on a 100 FPS server.

Some servers disable the wait command. While playing on them, wait commands will be ignored, making some scripts susceptible to crashes. A script containing an indeterminate loop spaced by wait commands will always immediately hang upon usage on such servers.

Aliases

An alias is like a variable that stores a series of commands which can be executed as a group. A simple alias will take the form:

alias "aliasname" "command1; command2; command3"

You can then execute the commands through a bound key:

bind "key" "aliasname"

Whenever the key is pressed, "command1", "command2", and "command3" are executed in order.

Complex aliases

Aliases can execute any command including other aliases. Furthermore, an alias can execute an alias in order to redefine that alias's commands. This allows you to create cycling aliases. Here is a very simple example:

bind "key" namescroll
alias namescroll "firstname" 
alias firstname "setinfo name ""First_name""; alias namescroll secondname" 
alias secondname "setinfo name ""Second_name""; alias namescroll thirdname"
alias thirdname "setinfo name ""Third-name""; alias namescroll firstname"

This is difficult to read, so to break it down.

  • The first line binds "key" to an alias "namescroll" which we have yet to define.
  • The second line creates the alias "namescroll" which executes the command "firstname"
  • The third line defines the "firstname" alias as two commands:
  • The first command sets your in-game name to "First_name"
  • The second command redefines the alias "namescroll" as an alias for executing the alias "secondname"
  • The fourth line defines "secondname" in the same manner. A different in-game name is set, and then "namescroll" is redefined to another alias "thirdname"
  • The fifth line defines "thirdname" just like the two before it, but with a twist. It redefines the "namescroll" alias as executing the "firstname" alias.

This completes a loop. Each press of the key executes a command and redefines the alias bound to the key, so that when it is next pressed it will execute a different command. If there were no loop, then the alias "namescroll" wouldn't always have another alias to execute with each keypress.

Alias 전환

Aliases can be used to toggle the state of some command between values (eg toggle cl_showfps between 0 and 1). This example demonstrates creating a generic toggle:

alias ToggleStateA "do A stuff; alias ToggleControl ToggleStateB"
alias ToggleStateB "do B stuff; alias ToggleControl ToggleStateA"
alias ToggleControl ToggleStateA
bind {toggle button} ToggleControl
  • The first line defines the first state and also tells the control to set the second state when next executed
  • The second line defines the second state and also tells the control to set the first state when next executed
  • The third line defines the control and initializes it to set the first state
  • The last line binds the toggle control to the button with which you want to toggle

Alias 스위칭

You can use the states of a set of aliases to rebind a key to something and back to its original. eg:

alias +AlternateBinds "bind Q do_B_stuff"
alias -AlternateBinds "bind Q do_A_stuff"
bind {bind switching key} +AlternateBinds

To execute do_B_stuff you would need to press both the bind switching key and Q.

명령어 반복

Aliases can be used in conjunction with the wait command to create looping aliases.

Warning:Not having the wait in place, or being on a server with wait disabled will cause this example to crash TF2.

alias "Loop" "echo Looping every 150 ticks.;wait 150;Loop"
Loop

Lets break this down into components:
Line 1
The echo displays a message to the console, just so you know it works. The wait makes it wait 150 ticks between iterations Loop calls the alias again, restarting at the echo.

Line 2 Loop starts the looping alias.

You can also create loops of alias commands, like this example:

alias "Loop1" "echo Loop 1;wait 150;Loop2"
alias "Loop2" "echo Loop 2;wait 150;Loop1"

Loop1 calls Loop2 which in turn calls Loop1, etc... This method can also be used for breaking a loop without clearing the loop alias:

alias "Loop1" "echo Loop1;wait 150;Loop2"
alias "Loop2" "Loop1"

This would create a loop, then

alias "Loop2"

would break it, by clearing the Loop2 alias.

You can use these for button presses(Via the +/- prefixes covered earlier) like this:

alias "Loop2" "Loop1"
alias "Loop1" "echo Loop1;wait 150;Loop2"
alias "+Loop" "alias Loop2 Loop1;Loop2"
alias "-Loop" "alias Loop2"
bind "<Key>" "+Loop"

In order of what it's doing:

1. Make Loop2 point to Loop1
2. Make Loop1 echo 'Loop1' to the console
3. wait 150
4. call Loop2
5. make +Loop point Loop2 to Loop1
6. run Loop2
7. make -Loop clear Loop2's link, breaking the loop.

유용한 스크립트 명령어들

There are literally hundreds of different arguments for your script that can make them do almost anything. Here's a list of a few of them.

음성 명령어

A voice command is the act of making your class say something, often used in gameplay as a way of either signaling information or just for goofing-off.

Voice commands are used with the following syntax;

voicemenu <menu_number> <phrase_number>

Where <menu_number> is the one of the 3 menus where voice commands are spread out through <phrase_number> is one of the 7 voice commands that are within each <menu_number> menu.

음성 명령어를 위한 구문

  • 0 <phrase_number>
    0: 메딕
    1: Thanks
    2: Go
    3: Move Up
    4: Flank Left
    5: Flank Right
    6: Yes
    7: No
  • 1 <phrase_number>
    0: Incoming
    1: Cloaked Spy
    2: Sentry Ahead
    3: Teleporter Here
    4: Dispenser Here
    5: Sentry Here
    6: Activate ÜberCharge
    7: (Medic Only) ÜberCharge Ready
  • 2 <phrase_number>
    0: Help
    1: Battlecry
    2: Cheers
    3: Jeers
    4: Positive
    5: Negative
    6: Nice Shot
    7: Good Job

빠른 스파이 변장

With these quick and easy commands, you can bind keys to specific disguises instead of having to flip through the disguise menu.

Disguise commands are used with the following syntax:

disguise <class_number> <team_number>

Where <class_number> is the number of the class you wish to disguise as, and <team_number> the number of the team you wish to disguise as.

Arguments for disguise commands

  • 1 <class_number>
    1: Scout
    2: Sniper
    3: Soldier
    4: Demoman
    5: Medic
    6: Heavy
    7: Pyro
    8: Spy
    9: Engineer
  • 2 <team_number>
    1: BLU team
    2: RED team
    -1: Opposite team
    -2: Same team

엔지니어 빠른 건물제작

Similar to the Spy's quick disguise, this allows the Engineer to bypass his PDA interface and instantly destroy an existing building type, while simultaneously pulling up blueprints to place a new building of the same type.

Building commands are used with the following syntax:

build <building_number>
destroy <building number>

Where <building_number> is the number of the building you wish to destroy or pull up blueprints for.

Arguments for building commands

  • Number: Building/Destroying
    0: Dispenser
    1: Teleporter Entrance
    2: Sentry Gun/Minisentry
    3: Teleporter Exit

An example of how to implement the above syntax is as follows:

alias sentry "destroy 2; build 2"
alias dispenser "destroy 0; build 0"
alias entrance "destroy 1; build 1"
alias exit "destroy 3; build 3"
bind f1 sentry
bind f2 dispenser
bind f3 entrance
bind f4 exit

In this example, buildings are bound to the F1-F4 keys so that they do not interfere with weapon selection keys. When activated, the script will instantly and irreversibly destroy an existing building of the listed type, while pulling up the Engineer's blueprints of the destroyed building's same type, ready to deploy. This script will still function if only one or two building types are used (in case you only want to map Sentry quickbuilding to a single key).

메딕 자동호출

The player can control the Medic's autocall threshold through keybinds. The command is:

hud_medicautocallersthreshold <percentage>

The percentage is the percent health below which the autocall is triggered; 0 will show nothing, while 300 will show all nearby allies (since 300% is the maximum possible health).

This command can be used to make the popular "Medic Radar" script: This set of aliases and commands will temporarily boost the Medic's autocall threshold to 300% (which covers everyone, even a Spy who just overhealed with a Conniver's Kunai) for as long as they hold a key down, allowing the player to see where all of their teammates are by their Medic autocall speech bubbles in the event they find themselves alone.

 alias "autocall_default" "hud_medicautocallersthreshold "75""
alias "autocall_all" "hud_medicautocallersthreshold "300""
alias "+radar" "autocall_all"
alias "-radar" "autocall_default"
bind mouse3 "+radar"

The default autocall value, or the autocall threshold when this command is not in use, can be adjusted to any desired number (in the example it is listed as 75% health) and the keybind to activate it can be changed as well (the example is bound to MOUSE3).

주목할만한 스크립트

There are several notable scripts that have affected gameplay. Some of these are patched out, while others remain functional.

패치된 스크립트

Pistol scripts

Originally, the Pistol could be fired almost as fast as the human hand could press a key. Realizing this, some people created scripts that made the Pistol fire as rapidly as possible as long as you held down the fire button. This not only allowed the Scout and Engineer to fire faster than most people could manage, but it was easier to aim because you weren't mashing any keys.

Valve eventually leveled the playing field. They patched the Pistol to have a lower max firing rate, which was reached by default whenever a player held down the attack key. The Pistol scripts were no longer necessary.

Targe turn scripts

Originally, the keyboard commands to turn your viewpoint left and right were not treated the same as the mouse commands. The Chargin' Targe was the first weapon to create a restriction on how quickly you could turn your viewpoint, therefore Valve put a limit on mouse turn-speed, yet forgot to apply the same restriction to the keyboard command that resulted in the same action.

Players made scripts that rebound keys whenever a player charged, allowing them to turn at full speed. The most sophisticated examples temporarily rebound the mouse x-axis inputs to the keyboard turn commands, then unbound them when the player attacked at the end of the charge.

Valve eventually capped the keyboard turn commands as they did with the mouse commands, thus conferring no advantage to individuals who used the script.

However, it is still possible to write a script that will toggle sensitivity between extremely high values when charging and normal values when the player performs an attack. It is also possible to turn easily while using a gamepad's analog sticks.

공중에서 앉기 스크립트

Originally, you could crouch as many times as you liked in a single jump. By binding a script to crouch and uncrouch as rapidly as possible, you could exploit the engine and make it difficult to properly register shots on jumping targets.

Valve patched it so you could only crouch twice in a single jump.

Current Scripts

무기 숨기기 스크립트

There are a large number of scripts which toggle the weapon display option depending on which weapon slot is selected for a class. Players often make their guns invisible to clear up the screen, but make items like melee weapons, PDAs, watches, and so forth visible because these models indicate important information. For example, the Spy relies heavily on his visible model to determine when he is cloaked, when his cloak is disturbed, and when the Dead Ringer activates. Other classes use the melee animations to judge when their attacks will hit.

센트리 점핑 스크립트

Since the Engineer Update, Engineers have been able to pack up and carry their Sentry Guns. Simultaneously introduced in the update, the Wrangler allows Engineers to Sentry jump with their Sentry rockets. With extremely fast inputs, it was discovered that a player could Sentry jump and successfully pack up their Sentry before they were launched away.

While a human can repeat this feat, it is difficult. Some players made scripts which could reliably execute the commands in the right order at the right speed allowing them to make a Sentry jump while carrying their Sentry every time.

Gunslinger Scripts

Since it can be troublesome to destroy then rebuild a Combat Mini-Sentry in the heat of battle through the PDA, some players have scripted the destruction and rebuilding of their Combat Mini-Sentry with the click of one or two mouse buttons. Such a script is especially useful when using the Frontier Justice, as the player gains practically instant access to revenge crits when needed.

Sensitivity and Control scripts

Some players prefer different mouse sensitivities and control schemes for some classes. (For example, changing from the Demoman, which doesn't require fine aiming, to the Sniper, which encourages low sensitivity for precise aiming so that a hand twitching inadvertently won't ruin a player's aim too much) These scripts alter control schemes and mouse settings on a per class, or even per weapon, basis.

차지 대시 스크립트

Since timing a charge and jump can be difficult, some players may use a quick script that binds the two actions to a button so that the charge dash will cover the maximum amount of distance possible. The player is still required to swing their melee weapon normally to end the charge though.

퀵스코프 스크립트

Many players find it difficult to scope in and fire straight after to get a quick headshot. There are scripts that will zoom in and fire just by clicking one mouse button. It may be harder to aim for some players because it is required that the player aim outside of the scope, though if this is mastered, a player can become much more effective at quickscoping.

Gloves of Running Urgently Scripts

While using the Gloves of Running Urgently, the player will constantly lose 6 health per second. However, jumping preserves the speed bonus granted by this weapon while the player is still in the air. Because of this, by jumping with this weapon, and then immediately switching to another weapon, health loss can be minimized with very little negative impact on speed. While a player can manually jump and continually switch weapons, using a script greatly simplifies this technique.

로켓 점프 스크립트

In order to Rocket Jump to a maximum height or distance, it is required that the player jumps, crouches, and fires their rocket at roughly the same time. Some players seem to find this difficult, and so use a simple script to perform this action at the press of a button.

관련 항목

외부 항목