Foundations of Scriptography [JKA3 - Jedi Academy 3]
Hello my little scripters! Today I will tell you about the script. Do you know what script? What? Speak louder, can not hear anything! Immortality? Nouklip? Goeth veapons APL? What nonsense! Sit down, two! So, let's start ... Scripts - it is an original program written in a text file with the cfg. This is a program on the command from the console game is read and then launched for execution. What can you do with a script? A lot of interesting things: to appoint a difficult admission to one key, to organize the automatic change of name, assign a replica of the keys to tie the optical sight to any weapon, including Saber, during the battle to change the color of the handle and the sword, and all that will you to your imagination. Let's start with the commands used in scripts: + Forward - go forward + Back - go back + Moveleft - go left + Moveright - go to the right + Left - turn left + Right - turn right + Movedown - sit down + Moveup - jump + Use - to use com_maxfps - set the number of feet per second per second cg_thirdpersoncameradamp - if you set a value of zero, the camera will harden in place and will follow the character cl_yawspeed - rate of turn with the arrow saberAttackCycle - change the style of the sword wait - pause (depending on the number of FPS, so the stability of the script with the expectation to reduce the number of FPS to the second best of 25) + Attack - an attack + Altattack - Alternative Attack echo - display a message at the top of the screen say - to say in general chat centerview - center the camera cl_pitchspeed - speed of rotation of the camera up and down with the team. + Lookdown - look down + Lookup - look up cg_fov - the team at the viewing angle (used to create the effect of the optical sight) Team with a plus sign will be carried out until the appropriate command followed by the sign -. The sequence of actions assigned to the key as follows:
bind x "com_maxfps 25;weapon 9; wait 3; +attack; wait 3; weapon 1; wait 3; weapon 9; wait 3; -attack; com_maxfps 999"
Here is a list of "special" keys, you may need to assign actions: MWHEELUP, MWHEELDOWN, MOUSE1, SPACE. First, the script sets the number of frames per second, on which the team wait, so that the script was stable. For better picture quality at the end of the script with the values of the restriction is removed. Also, the wait command there is one drawback - the game ignores all keystrokes during the term of this period, you can only specify the direction of gaze with the mouse. Now let's talk about the procedures.
The procedure - is part of the program. The procedure is described as follows:
set * procedure name * "sequence"
for example:
set auto-rocket "com_maxfps 25;weapon 9; wait 3; +attack; wait 3; weapon 1; wait 3; weapon 9; wait 3; -attack"
The key can be assigned to a procedure, or include it in the following sequence of actions recorded
vstr * procedure name *
For example:
bind x "vstr auto-rocket"
If you want to spend full of reception on the move, remember that if you receive first move in any direction, you will continue to move in it, since the game because of the wait command can not assume that you release the key. To prevent this from happening in the early admission process is stopped:
set stop "-moveright;-back;-moveleft;-forward;-attack"
You can also program the cycles of action. Pressing the button which - the action, thenthe button on the machine is assigned a different action...
bind F1 "vstr up"set up "+moveup;wait 10; -moveup;bind F1 vstr down"set down "+movedown; wait 10; - movedown; bind F1 vstr up;
When you press the F1 key character jump, pressed again, the character will sit down. Purpose of Action for the shortcut. Similarly, the cycle only when you press a buttonassigned to another program. Pressed the second button - and a second evaluation has been done taking the key back the original value. For example:
bind MOUSE1 "vstr stop; bind w vstr +Attack_w"set +Attack_w "bind w +forward; com_maxfps 25; -forward; saberAttackCycle; wait 5; +movedown; wait 2; +forward; +attack; wait 2; -attack; -movedown; -forward;wait 11;saberAttackCycle;com_maxfps 999"
Good Luck, my little scripters!










