Basic tutorial 11
Cycle script.
The cycle command is not used often, cause most people tend to prefer a toggle script over a cycle script. I'll explain why after I explain how it works.
A cycle script can quickly cycle (duh :D) through different values for 1 setting, which can also be done by a toggle script. The cycle script is a bit more compact though. In general it should look like this:
bind key "cycle setting startvalue endvalue stepsize"
Let's apply this to the same example we used for the toggle in the eighth tutorial. So we want a sensitivity cycle script with startvalue 1.0, endvalue 2.0 and stepsize 0.5. This script should be as followed:
bind x "cycle 1.0 2.0 0.5"
As you can see it a lot more compact than the equivalent toggle script in the eighth tutorial. Then why do people prefer the toggle script? Well you cannot apply any echoes to a cycle script, whereas with a toggle script you can. The advantage of an echo was discussed in the ninth tutorial.
|