![]() If you use this style, you don’t need “ ” between individual commands, only start them on a new line): (As your scripts get more complex, you’ll want to move away from using single-liners, and start formatting them like the following. (Note: remember to put $ before any variables in the statement.) If they do, then the following will execute if not, the script will pass on to the next part (if there is any). These statements are comparing the value of a script/variable (these are the same thing script names are just variables with scripts as their values) called "zoomvar" and 1, to see if they equal each other. First comes the equals? CubeScript has some odd syntax. Then we have parentheses enclosing some wierd math equation. Here's how if's used, with an explanation:įirst comes " if" itself, declaring this to be an if-then statement. The sooner you learn to use it, the better. " if" is a neccessary part of many, many scripts. Plus, you never (except in rare cases) want to bind anything inside a script. So many problems arise with this one that it’s impossible to use. A touchy way to do this is (if you want the zoom bound to MOUSE2): Let's say you want to click to zoom in, and then click to zoom out. Now let's try one that’s a little more complex. ![]() ![]() Try the command " onrelease", which will execute whatever you tell it to when you release the button. The simplest way is to zoom all the way in when you click the button: (Make sure to use spaces between the name, the equals sign, and the brackets that contain the script.) Now that you’ve got a name, let’s find a way to decrease your fov. The second is newer, but a lot easier to use: we'll use this. ![]() The first one is the original way, so you’ll see it used a lot. How about “zoom”? To name an alias (a name that allows easier script execution), you can use two methods: Your first will be much simpler, of course. The script I commonly use was written by rootnis, and it allows you to zoom in while you hold down MOUSE2, but stop any time the next click, you return to normal zoom. You only decrease the field of vision ( fov), which give the effect of zooming in, and allows you to see much finer details. Zfov = ( + $zfov ( * $arg1 ( div $zfov -5 ) ) ) Sauerbraten already comes with one, but it's kinda hard to use (hold "G" while scrolling with the mouse, then scroll out to zoom out).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |