git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3134 e016b1c5-ed68-44aa-a2f7-31cac88cffde
50 lines
2.4 KiB
HTML
50 lines
2.4 KiB
HTML
<!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.html#section_CubeScript" shape="rect">reference</a>
|
|
for information about those commands.
|
|
</p>
|
|
</div>
|
|
<div id="footer">
|
|
Rabid Viper Productions 2008/03/07
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|