[BASIC]Creating Script Tutorial

TheAmerican

Rookie
Joined
May 5, 2009
Messages
35
Recently I learned to create ".cfg" files which can be used to create binds in games like TF2 and DOD:S to make hard tasks simple!

So first off we need to learn about one of the most important things in cfg scripts which is an "Alias". Aliases are just names for an action, like so.


LINE1:Alias "+NewScript" "Bind mouse1 Exclaim"
Line2:Alias "-NewScript" "-attack bind mouse1 +attack"
LINE3:Alias "Exclaim" "say_team "Hello World!""
LINE4:bind mouse2 "+Newscript"


Lets start by looking at LINE4. When we press "mouse2" it will execute"+Newscript" which is Line1.

So now that we executed "+Newscript" our "mouse1" has been bound to "Exclaim" which is on LINE3. After pressing mouse1 we will yell out "Hello World!" to our team then execute LINE2 which will rebind mouse1 back to our normal attacking then the script is ready to use again.

Any questions? It was quite hard for me to think of an ingame example so if any suggestions are in your head please say something.
 
Back
Top