home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2007 September / maximum-cd-2007-09.iso / Assets / data / AssaultCube_v0.93.exe / docs / cubescript.xml < prev    next >
Encoding:
Extensible Markup Language  |  2007-05-05  |  2.2 KB  |  38 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <?xml-stylesheet type="text/xsl" href="transformations/cubedoc2xhtml.xslt"?>
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" lang="en" xml:lang="en">
  6.   <head>
  7.     <title></title>
  8.   </head>
  9.   <body>
  10.     <h1>CubeScript Console Language</h1>
  11.  
  12.     <p>
  13.       Cube's console language is similar to console languages of other games (e.g. Quake), but is a bit more powerful in
  14.       that it is almost a full programming language.
  15.     </p>
  16.  
  17.     <p>
  18.       What is similar to quake is the basic command structure: commands consist of the command itself, followed by any
  19.       number of arguments seperated by whitespace. you can use "" to quote strings with whitespace in them (such as the
  20.       actions in bind/alias), and whereever a command is required you can also use ; to sequence multiple commands in one.
  21.     </p>
  22.     <p>
  23.       What is new compared to quake is that you can evaluate aliases and expressions. You can substitute the value of an
  24.       alias as an argument by prefixing it with a "$" sign, i.e.: <span class="code">echo The current value of x is $x</span>
  25.       You can even substitute
  26.       the values of console variables this way, i.e $fov gives the current fov. Some aliases are set automatically, for
  27.       example $arg1 to $argN are set if you supply arguments when you execute an alias.
  28.     </p>
  29.     <p>
  30.       There are two alternative ways to "" to quote a string: () and []. They work in the same way as "", with the difference
  31.       that they can be nested infinitely, and that they may contain linefeeds (useful for larger scripts). () is different
  32.       from [] in that it evaluates the commands contained in it _before_ it evaluates the surrounding command, and substitutes
  33.       the results. () bracketed strings are called expressions, and combined with some commands made especially for
  34.       "programming", you have a minimal language. See the <a href="reference.xml#section_CubeScript">reference</a>
  35.       for information about those commands.
  36.     </p>
  37.   </body>
  38. </html>