1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"><html lang="en" xml:lang="en" xmlns:h="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CubeScript Console Language</title>
<meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8"/>
<link rel="shortcut icon" href="pics/favicon.ico"/>
<link rel="stylesheet" href="styles/cubedoc.css"/>
</head>
<body>
<div id="main">
<div id="logo">
<img src="pics/head.gif" alt="AssaultCube logo"/>
</div>
<div id="title">
<h1>
AssaultCube: CubeScript Console Language</h1>
</div>
<div id="content">
<h1>CubeScript Console Language</h1>
<p>
Cube's console language is similar to console languages of other games (e.g. Quake), but is a bit more powerful in
that it is almost a full programming language.
</p>
<p>
What is similar to quake is the basic command structure: commands consist of the command itself, followed by any
number of arguments seperated by whitespace. you can use "" to quote strings with whitespace in them (such as the
actions in bind/alias), and whereever a command is required you can also use ; to sequence multiple commands in one.
</p>
<p>
What is new compared to quake is that you can evaluate aliases and expressions. You can substitute the value of an
alias as an argument by prefixing it with a "$" sign, i.e.: <span class="code">echo The current value of x is $x</span>
You can even substitute
the values of console variables this way, i.e $fov gives the current fov. Some aliases are set automatically, for
example $arg1 to $argN are set if you supply arguments when you execute an alias.
</p>
<p>
There are two alternative ways to "" to quote a string: () and []. They work in the same way as "", with the difference
that they can be nested infinitely, and that they may contain linefeeds (useful for larger scripts). () is different
from [] in that it evaluates the commands contained in it _before_ it evaluates the surrounding command, and substitutes
the results. () bracketed strings are called expressions, and combined with some commands made especially for
"programming", you have a minimal language. See the <a href="reference.xml#section_CubeScript" shape="rect">reference</a>
for information about those commands.
</p>
</div>
<div id="footer">
Rabid Viper Productions
</div>
</div>
</body>
</html>
|