1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <title>Skyscraper Building Design Guide</title>
5 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
11 <p><strong><font size="+2">Skyscraper 1.9<br>
12 Building Design Guide<br>
13 </font></strong>Copyright (C)2005-2014 Ryan Thoryk</p>
16 <p align="left">This document describes how to create your own buildings for
17 the Skyscraper simulator, and also describes all of the available commands.
18 Please note that the commands and syntax will change frequently during the
19 simulator's development, and formatting will be cleaned up to make the code
20 more readable. A graphical building designer is planned, which will generate
21 these script files based on simplified CAD-like floorplan layouts, and will
22 also allow the user to view the building in 3D as it's being created.</p>
26 <p align="center"><font size="+1"><strong><u>Contents</u></strong></font></p>
28 <p align="center"><a href="#Start">Starting a new building</a></p>
30 <p align="center"><a href="#General">General Stuff</a></p>
32 <p align="center"><a href="#Globals">Globals Section</a></p>
34 <p align="center"><a href="#Textures">Textures Section</a></p>
36 <p align="center"><a href="#Floor">Floor Sections</a></p>
38 <p align="center"><a href="#Elevator">Elevator Sections</a></p>
40 <p align="center"><a href="#GlobalCommands">Global Commands</a></p>
42 <p align="center"><a href="#Functions">Predefined Functions</a></p>
44 <p align="center"><a href="#Example">Example Building</a></p>
48 <p align="left"><strong><font size="+1"><a name="Start"></a>1. Starting a new
49 building</font></strong></p>
51 <p align="left">Buildings are stored in text files in Skyscraper's
52 <em>buildings</em> folder, usually at "c:\program files\skyscraper\buildings"
53 on Windows, or in the "buildings" directory on Unix. The filenames end in BLD,
54 and so you need to make sure your text file ends with ".bld" and not ".txt". To
55 create a new building, first open up a text editor, and read the instructions
56 below. When you're finished, save it into the <em>buildings</em> folder shown
57 above, as something like "mybuilding.bld". The building will appear when you
58 choose "Other buildings..." in Skyscraper's main menu the next time you run it.
59 A simplistic building is included for you to get a good idea of the overall
60 format of a typical building data file. You might also want to open one of the
61 other buildings that come with Skyscraper ("Triton Center.bld", "Glass
62 Tower.bld", etc) for examples on the more advanced functions. Please note that
63 the script syntax will change in the future.</p>
67 <p align="left"><strong><font size="+1"><a name="General"></a>2. General
68 Stuff</font></strong></p>
70 <p align="left"><strong>1. Comments</strong></p>
72 <p align="left">To add a comment to your file, simply put the # symbol right
73 before your comment. For example:<br>
74 <font face="Courier New, Courier, mono" size="2"># This is a comment</font></p>
76 <p align="left">It's a good idea to use comment markers to add a title header
77 at the top of your building file. The Triton Center file has this header:<br>
78 <font face="Courier New, Courier, mono" size="2">#The Triton Center<br>
79 #Copyright ©2002-2013 Ryan Thoryk</font></p>
82 <strong>2. Variables</strong></p>
84 <p align="left">Variables are marked with percent signs (%), and most system
85 variables will be described later. Variables can be set using the Set
86 command:<font face="Courier New, Courier, mono" size="2"><br>
87 Set myvariable = 100<br>
88 </font>and then can be used later:<font face="Courier New, Courier, mono"
90 Height = %myvariable%<br>
94 <p align="left"><strong>3. IF/While statements</strong></p>
96 <p align="left">Basic IF and While statements can be made, with the following
98 <font face="Courier New, Courier, mono" size="2">if[<em>expression</em>]
100 while[<em>expression</em>] command</font></p>
102 <p align="left">Available signs are = (equals), > (greater than), < (less
103 than), ! (is not), & (and) and | (or). Expressions can also be enclosed in
104 parenthesis. Note that IF/While statements only work with the current line, and
105 do not currently support multiple lines within an IF/While block, an "else"
106 statement, or nesting. A While statement will loop the current line until the
107 expression is false, so be careful with this because it can create an infinite
108 loop if the expression is always true. See the <em>Functions</em> section below
109 for an example of a While statement.</p>
111 <p align="left">For example, to set the height to 9.5 if the floor number is
113 <font face="Courier New, Courier, mono" size="2">if[%floor% < 82] Height =
116 <p align="left">This example shows a complex expression:<br>
117 <font face="Courier New, Courier, mono" size="2">if[%floor% < 82 &
118 (%height% = 3 | %height% = 5)] Height = 9.5</font></p>
120 <p align="left">In the above example, the statement will be true if the
121 <em>floor</em> value is less than 82 and if the <em>height</em> value is either
126 <p align="left"><strong>4. Inline calculations</strong></p>
128 <p align="left">Values can be calculated inline by using the following math
130 + (plus), - (minus), / (divide), * (multiply), and ^ (power of)</p>
132 <p align="left">They can be used anywhere in the data file. Here's an example
133 of one being used with the Set command:<br>
134 <font face="Courier New, Courier, mono" size="2">Set 1 = %floorheight% +
137 <p align="left">Parenthesis are also supported, for grouped operations. Here's
138 an example of a complex math expression:<br>
139 <font face="Courier New, Courier, mono" size="2">Set 5 = %height% +
140 (%interfloorheight% * (4 / %altitude%))</font></p>
142 <p align="left"><font face="Courier New, Courier, mono" size="2"><br>
143 </font><strong>5. Object parameters from outside floor sections</strong></p>
145 <p align="left">Information about a certain floor can be obtained elsewhere in
146 the script, by referencing the floor in this manner:</p>
148 <p align="left"><font face="Courier New, Courier, mono"
149 size="2">Floor(<em>number</em>).<em>parameter</em></font></p>
151 <p align="left">Available parameters are <em>Base</em>, <em>Altitude</em>,
152 <em>Height</em>, <em>FullHeight</em> and <em>InterfloorHeight</em>. Note that
153 this function must only be called after the specified floor has been
155 If the <em>InterfloorOnTop</em> parameter in the globals section is set to
156 'false' (the default), then <em>Base</em> refers to the floor's altitude plus
157 interfloor height; otherwise it refers to the altitude.</p>
159 <p align="left">Example:<font face="Courier New, Courier, mono" size="2"><br>
160 Set 1 = Floor(5).Altitude</font></p>
162 <p align="left"><strong><font face="Courier New, Courier, mono" size="2"><br>
163 </font>6. Includes</strong></p>
165 <p align="left">Other script files can be included (inserted) anywhere in the
166 current script by using the <Include> command. Scripts can be included
167 multiple times, and included scripts can include other scripts.</p>
169 <p align="left">Syntax:<br>
170 <font face="Courier New, Courier, mono" size="2"><Include
171 <em>filename</em>></font></p>
173 <p align="left">To include a file called test.txt that's in the data folder,
175 <font face="Courier New, Courier, mono" size="2"><br>
176 <Include data/test.txt><br>
180 <strong>7. Functions</strong></p>
182 <p align="left">Functions can be created to share code between sections of
183 scripts, and also between entire scripts when used in conjunction with
184 includes. An unlimited number of parameters can be specified for each function.
185 If a function is specified with the same name as a previously defined function,
186 the function will be skipped and a warning will be printed. This can only be
187 used outside of any section, such as <Floor>.</p>
189 <p align="left">Syntax:<br>
190 <font face="Courier New, Courier, mono" size="2"><Function
191 <em>name</em>><br>
193 <EndFunction> </font></p>
195 <p align="left">The above is a function definition, and must be used before the
196 function call. Functions can be called from anywhere in the script, and can
197 also call other functions, resulting in nested functions. To call the function
198 later in your code, use the function name followed by a list of parameters
199 contained within parenthesis, or just parenthesis if you're not passing any
202 <p align="left">Syntax:<br>
203 <em>name</em>(<em>parameter1</em>, <em>parameter2</em>, ...)<br>
207 The parameters appear as variables inside the function in the form of <font
208 face="Courier New, Courier, mono" size="2">%param#%</font> - so the first
209 parameter passed is <font face="Courier New, Courier, mono"
210 size="2">%param1%</font>, the second is <font face="Courier New, Courier, mono"
211 size="2">%param2%</font>, etc. For an example, I'll create a function called
212 Test with a single SetAutoSize command within it, and call that function:</p>
216 <p><font face="Courier New, Courier, mono" size="2"><Function test><br>
217 SetAutoSize = %param1%, %param2%<br>
218 <EndFunction><br>
220 test(false, false)</font></p>
222 <p>In the above example, the command that ends up being performed is
223 "SetAutoSize = false, false". Here is an example of using a While statement to
226 <p><font face="Courier New, Courier, mono" size="2">set a = 0<br>
227 <Function testing><br>
230 <EndFunction><br>
232 while [%a% < 5] testing()<br>
233 print finished</font></p>
235 <p>The console output of that ends up being:</p>
237 <p><font face="Courier New, Courier, mono" size="2">1<br>
245 <strong>8. Advanced Math Functions</strong></p>
247 <p align="left">Several built-in advanced math functions are provided, mostly
248 for trigonometric calculations.</p>
250 <p align="left">Syntax and descriptions:<br>
252 cos(<em>x</em>) - calculate cosine, x is angle in radians<br>
253 sine(<em>x</em>) - calculate sine, x is angle in radians<br>
254 tan(<em>x</em>) - calculate tangent, x is angle in radians<br>
255 acos(<em>x</em>) - calculate arc cosine, x is a value from -1 to 1<br>
256 asin(<em>x</em>) - calculate arc sine, x is a value from -1 to 1<br>
257 atan(<em>x</em>) - calculate arc tangent<br>
258 atan2(<em>y</em>, <em>x</em>) - calculate arc tangent with two values, one for
259 the y-coordinate and one for the x<br>
260 sqrt(<em>x</em>) - calculate square root<br>
261 abs(<em>x</em>) - calculate absolute value<br>
262 exp(<em>x</em>) - calculate exponential function<br>
263 log(<em>x</em>) - calculate natural logarithm<br>
264 log2(<em>x</em>) - calculate binary logarithm<br>
265 log10(<em>x</em>) - calculate common logarithm<br>
266 mod(<em>number</em>, <em>denominator</em>) - calculate modulo (remainder) of a
268 hypot(<em>x</em>, <em>y</em>) - calculate hypotenuse<br>
269 ceil(<em>number</em>) - calculate ceiling (round up)<br>
270 flr(<em>number</em>) - calculate floor (round down)<br>
271 rnd(<em>limit</em>) - generate random number from 0 to limit<br>
272 round(<em>number</em>) - round number to nearest integer<br>
287 <p align="left"><strong><font size="+1"><a name="Globals"></a>3. The
288 <em>Globals</em> Section</font></strong></p>
290 <p align="left">The <em>Globals</em> section contains the general information
291 about your building. The section starts with this header:<br>
292 <font face="Courier New, Courier, mono" size="2"><Globals></font></p>
294 <p align="left">and ends with this footer:<br>
295 <font face="Courier New, Courier, mono" size="2"><EndGlobals></font></p>
297 <p align="left">Parameters are placed between those two markers, and look like
299 <font face="Courier New, Courier, mono" size="2">Parameter =
300 <em>value</em></font></p>
302 <p align="left">Example:<br>
303 <font face="Courier New, Courier, mono" size="2">Name = Triton Center</font></p>
305 <p align="left"><strong>Parameters (all are optional):</strong></p>
307 <p align="left"><strong>1. Name</strong> - building name<br>
308 Example: <font face="Courier New, Courier, mono" size="2">Name = My
311 <p align="left"><strong>2. Designer</strong> - name of building's designer<br>
312 <font face="Courier New, Courier, mono" size="2">Designer = Me</font><br>
314 <strong>3. Location</strong> - location of the building<br>
315 <font face="Courier New, Courier, mono" size="2">Location = 100 Main
318 <p align="left"><strong>4. Description</strong> - Brief description of the
320 <font face="Courier New, Courier, mono" size="2">Description = A really average
323 <strong>5. Version</strong> - Version of the building (can be text)<br>
324 <font face="Courier New, Courier, mono" size="2">Version = 1</font><br>
326 <strong>6. CameraFloor</strong> - camera's starting floor, starting with 0
327 (like Floors command) - default is 0<br>
328 <font face="Courier New, Courier, mono" size="2">CameraFloor = 0</font><br>
330 <strong>7. CameraPosition</strong> - camera's starting position in X
331 (left/right) and Z (forward/backward) feet coordinates - default is "0, 0"<br>
332 Syntax: <font face="Courier New, Courier, mono" size="2">CameraPosition =
333 <em>X</em>, <em>Z</em></font><br>
334 <font face="Courier New, Courier, mono" size="2">CameraPosition = 0,
337 <strong>8. CameraDirection</strong> - specifies a 3D point that the camera is
338 looking at on startup (instead of specifying rotation), in X (left/right), Y
339 (up down), and Z (forward/backward) feet coordinates.<br>
340 <font face="Courier New, Courier, mono" size="2">CameraDirection = 0, 10,
343 <p align="left"><strong>9. CameraRotation</strong> - axis rotation of the
344 camera on startup - X is degrees up/down, Y is degrees left/right, and Z is
345 spin. Default is "0, 0, 0", and the example makes the camera face right.<br>
346 Syntax: <font face="Courier New, Courier, mono" size="2">CameraRotation =
347 <em>X</em>, <em>Y</em>, <em>Z</em></font><br>
348 <font face="Courier New, Courier, mono" size="2">CameraRotation = 0, 90,
351 <p align="left"><strong>10. Sky</strong> - which skybox texture pack to use, if
352 the Caelum sky system is off. In the following example, the chosen pack is
353 "noon", and the file "sky-noon.zip" will be loaded. Default is "noon".<br>
354 <font face="Courier New, Courier, mono" size="2">Sky = noon<br>
357 <p align="left"><strong>11. DynamicSky </strong>- which Caelum sky script to
358 use. In the following example, the script is "RainWind", which is listed in the
359 data/caelum/sky.os resource file. Default is "DefaultSky".<br>
360 <font face="Courier New, Courier, mono" size="2">DynamicSky = RainWind<br>
363 <p style="text-align:left;margin-left:0;margin-right:auto;">Available sky types
364 in data/caelum/sky.os file:<br>
368 BigPuffyStarsWithFogComposer<br>
375 HugeAmbientFactor<br>
380 SkyDomeOverrideHazeTest<br>
384 <p align="left"><strong>12. InterfloorOnTop</strong> - determines if the
385 interfloor area should be located at the bottom or top of each floor.
386 Interfloor areas represent the area used by floor trusses (supports), between a
387 level's ceiling and the next level. Since each floor needs supports below it,
388 the default is false.<br>
389 <font face="Courier New, Courier, mono" size="2">InterfloorOnTop =
392 <p align="left"><strong>13. Collisions</strong> - enables/disables collisions
393 (default is true)<br>
394 <font face="Courier New, Courier, mono" size="2">Collisions = false</font></p>
396 <p align="left"><strong>14. Gravity</strong> - enables/disables gravity
397 (default is true)<br>
398 <font face="Courier New, Courier, mono" size="2">Gravity = false</font></p>
400 <p align="left"> </p>
402 <p align="left"><strong><font size="+1"><a name="Textures"></a>4. The
403 <em>Textures</em> Section</font></strong></p>
405 <p align="left">The Textures section loads textures into the simulation and
406 assigns names to them, for use in the rest of the sections. The section starts
407 with this header:<br>
408 <font face="Courier New, Courier, mono" size="2"><Textures></font></p>
410 <p align="left">and ends with this footer:<br>
411 <font face="Courier New, Courier, mono" size="2"><EndTextures></font></p>
413 <p align="left"><strong>1. Load</strong> - loads a texture<br>
414 Syntax: <font face="Courier New, Courier, mono" size="2">Load
415 <em>filename</em>, <em>name</em>, <em>tile_x</em>, <em>tile_y[,
416 force</em></font>]<br>
417 Example: <font face="Courier New, Courier, mono" size="2">Load data\brick1.jpg,
418 Brick, 1, 1</font></p>
420 <p align="left">This example will load the file brick.jpg and name it Brick.
421 The values <em>tile_x</em> and <em>tile_y</em> are per-texture multipliers. For
422 example, if you set <em>tile_x</em> to 2, and you specify a texture width (tw)
423 of 2 during an <em>AddFloor</em> command later, the tiling value will be 4 (2
424 times 2), and the texture will be repeated 4 times horizontally. The
425 <em>force</em> value is optional, and if set to false, autosizing will always
426 be disabled for this texture; if set to true, autosizing will always be
429 <p align="left"><strong>2. LoadRange</strong> - loads a numeric range of
430 textures, and the current number is available in the <em>number</em> variable
431 (<font face="Courier New, Courier, mono" size="2">%number%</font>)<br>
432 Syntax: <font face="Courier New, Courier, mono" size="2">LoadRange
433 <em>startnumber</em>, <em>endnumber</em>, <em>filename</em>, <em>name</em>,
434 <em>tile_x</em>, <em>tile_y[, force] </em></font><br>
435 Example: <font face="Courier New, Courier, mono" size="2">LoadRange 2, 138,
436 data\floorindicators\%number%.jpg, Button%number%, 1, 1</font></p>
438 <p align="left">This example will load the file 2.jpg and name it Button2,
439 3.jpg as Button3, and so on. The values <em>tile_x</em> and <em>tile_y</em> are
440 per-texture multipliers. For example, if you set <em>tile_x</em> to 2, and you
441 specify a texture width (tw) of 2 during an <em>AddFloor</em> command later,
442 the tiling value will be 4 (2 times 2), and the texture will be repeated 4
443 times horizontally. The <em>force</em> value is optional, and if set to false,
444 autosizing will always be disabled for this texture; if set to true, autosizing
445 will always be enabled.</p>
447 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>3.
448 LoadAnimated</strong> - loads a set of textures to use as a single animated
450 Syntax: <font face="Courier New, Courier, mono" size="2">LoadAnimated
451 <em>filename1, filename2, ..., name, duration, tile_x, tile_y[, force]<br>
452 </em></font>Example: <font face="Courier New, Courier, mono"
453 size="2">LoadAnimated data/pic1.jpg, data/pic2.jpg, data/pic3.jpg, myanimation,
456 <p style="text-align:left;margin-left:0;margin-right:auto;">This example will
457 load the files pic1.jpg, pic2.jpg and pic3.jpg and associate them with the
458 texture material "myanimation". When "myanimation" is used, those three images
459 will automatically be displayed in order, in a loop. <em>Duration</em> refers
460 to the length of the animation in seconds. The values <em>tile_x</em> and
461 <em>tile_y</em> are per-texture multipliers. For example, if you set
462 <em>tile_x</em> to 2, and you specify a texture width (tw) of 2 during an
463 <em>AddFloor</em> command later, the tiling value will be 4 (2 times 2), and
464 the texture will be repeated 4 times horizontally. The <em>force</em> value is
465 optional, and if set to false, autosizing will always be disabled for this
466 texture; if set to true, autosizing will always be enabled.</p>
468 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>4.
469 LoadAlphaBlend</strong> - loads a texture with a specular mask texture and
470 blending texture, used to make things like reflection effects<br>
471 Syntax: <font face="Courier New, Courier, mono" size="2">LoadAlphaBlend
472 <em>filename, specular_filename, blend_filename, name, spherical, tile_x,
474 </em></font>Example: <font face="Courier New, Courier, mono"
475 size="2">LoadAlphaBlend data/windows.jpg, data/windows_spec.png, data/sky.jpg,
476 mywindows, true, 1, 1<br>
477 </font>This example will load the texture windows.jpg normally, and will load
478 windows_spec.png as a specular mask (which needs to be a file that contains an
479 alpha blended image that is used to determine how the blending texture applies
480 to the original texture), and loads a texture to blend as sky.jpg (see
481 Skyscraper's data folder for examples of this). The <em>spherical</em>
482 parameter determines if the texture is spherically mapped (true) or planar
483 mapped (false). The values <em>tile_x</em> and <em>tile_y</em> are per-texture
484 multipliers. For example, if you set <em>tile_x</em> to 2, and you specify a
485 texture width (tw) of 2 during an <em>AddFloor</em> command later, the tiling
486 value will be 4 (2 times 2), and the texture will be repeated 4 times
487 horizontally. The <em>force</em> value is optional, and if set to false,
488 autosizing will always be disabled for this texture; if set to true, autosizing
489 will always be enabled.</p>
491 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>5.
492 LoadMaterial</strong> - loads a custom OGRE material, used for
493 advanced/specific texture definitions<br>
494 Syntax: <font face="Courier New, Courier, mono" size="2">LoadMaterial
495 <em>material_name, name, </em><em><em>tile_x, tile_y[, force]<br>
496 </em></em></font>Example: <font face="Courier New, Courier, mono"
497 size="2">LoadMaterial testmat, mycustommaterial, 1, 1<br>
498 </font>Material definitions (and their associated textures) are stored in
499 Skyscraper's data/materials folder, and are all automatically loaded on
500 startup. The material definitions (the example being testmat.material) contain
501 a material name along with the texture processing parameters. The material name
502 specified in this command needs to match the one in the material definition you
503 want to use; the example file is named "testmat". <em>Name</em> is the standard
504 texture name you want to map it to, to use with other commands. The other
505 commands are the same as in previous commands. For more information on how to
506 make material definition scripts, see the <a
507 href="http://www.ogre3d.org/docs/manual/manual_14.html#Material-Scripts">OGRE
508 manual's "Material Scripts" section</a>.</p>
510 <p align="left"><strong>6. AddText</strong> - draws text onto a texture - this
511 only creates a new texture during runtime (in memory), and all changes are lost
512 when the application shuts down<br>
513 Syntax: <font face="Courier New, Courier, mono" size="2">AddText
514 <em>texture_name, name, font_filename, font_size, text, x1, y1, x2, y2,
515 h_align, v_align, ColorR, ColorG, ColorB[, force</em></font><em>]<br>
516 </em>Example: <font face="Courier New, Courier, mono" size="2">AddText Black,
517 Button100, nimbus_sans.ttf, 47, 100, -1, -1, -1, -1, center, center, 255, 255,
520 <p align="left">With this command, <em>texture_name</em> is the name of the
521 previously loaded texture to draw text onto (loaded with either Load or
522 LoadRange). <em>Name</em> is the name to call this new texture.
523 <em>Font_filename</em> is the filename of the font to use - fonts are in
524 Skyscraper's data/fonts directory. <em>X1</em>, <em>y1</em>, <em>x2</em>, and
525 <em>y2</em> are coordinate values mainly used to position the text in a boxed
526 area, with the position of 0, 0 (x 0, y 0) being on the top left.. If any value
527 is -1, the dimension of the texture will be used (so in this example, the
528 loaded texture has a size of 128x128 pixels, and so the values are 0, 0, 128,
529 128). This will place the text in the center of the texture image, but to
530 position it elsewhere, specify the pixel box to place it in. <em>H_align</em>
531 and <em>v_align</em> determine the alignment of the text - for h_align, it can
532 either be "left", "right" or "center", and for v_align either "top", "bottom"
533 or "center". <em>ColorR</em>, <em>ColorG</em> and <em>ColorB</em> determine the
534 color of the text, and the values range from 0 to 255. If all values are 255,
535 the text is white, and if all values are 0, then it's black. The <em>force</em>
536 value is optional, and if set to false, autosizing will always be disabled for
537 this texture; if set to true, autosizing will always be enabled.</p>
539 <p align="left"><strong>7. AddTextRange</strong> - similar to LoadRange, but
540 draws text onto a texture<br>
541 Syntax: <font face="Courier New, Courier, mono" size="2">AddText
542 <em>startnumber, endnumber, texture_name, name, font_filename, font_size, text,
543 x1, y1, x2, y2, h_align, v_align, ColorR, ColorG, ColorB[,
544 force</em></font><em>]<br>
545 </em>Example: <font face="Courier New, Courier, mono" size="2">AddText 1, 100,
546 Black, Button%number%, nimbus_sans.ttf, 47, %number%, -1, -1, -1, -1, center,
547 center, 255, 255, 255</font></p>
549 <p align="left"><strong>8. LoadCropped</strong> - loads a cropped image.<br>
550 Syntax: <font face="Courier New, Courier, mono" size="2">LoadCropped
551 <em>filename, name, x, y, width, height, tile_x, tile_y[,
552 force</em></font><em>]<br>
553 </em>Example: <font face="Courier New, Courier, mono" size="2">LoadCropped
554 data\brick1.jpg, Brick2, 10, 10, 20, 20, 1, 1</font></p>
556 <p align="left">This command is similar to the Load command, but loads only a
557 portion of an image. In the above example, the command loads the file
558 data\brick1.jpg as "Brick2", but only loads the portion of the image starting
559 at pixel 10, 10, with a width of 20 pixels and a heigth of 20 pixels. Pixel 0,
560 0 is on the top left of the image. The <em>force</em> value is optional, and if
561 set to false, autosizing will always be disabled for this texture; if set to
562 true, autosizing will always be enabled.</p>
564 <p align="left"><strong>9. AddOverlay</strong> - draws an image on top of
566 Syntax: <font face="Courier New, Courier, mono" size="2">AddOverlay
567 <em>texture_name, overlay_texture_name, name, x, y, width, height, tile_x,
568 tile_y[, force]</em></font><em><br>
569 </em>Example: <font face="Courier New, Courier, mono" size="2">AddOverlay
570 Brick1, Brick2, NewBrick, 25, 25, 50, 50, 1, 1</font></p>
572 <p align="left">This command allows multiple textures to be combined into a
573 single texture, by drawing one on top of the other. <em>Texture_name</em>
574 specifies the original source texture name to use (all textures must be loaded
575 beforehand), <em>overlay_texture_name</em> specifies the texture to draw on top
576 of the source texture, and <em>name</em> specifies the name of the new texture.
577 <em>X</em> and <em>Y</em> determine the position to place the top-left of the
578 new image at (since position 0, 0 is the top left of the image), and
579 <em>width</em> and <em>height</em> determine the size in pixels of the overlay
580 texture. In the above example, the "Brick2" texture is drawn on top of the
581 "Brick1" texture, starting at pixel position 25, 25, with a width of 50 and a
582 height of 50. The resulting texture is called "NewBrick". The <em>force</em>
583 value is optional, and if set to false, autosizing will always be disabled for
584 this texture; if set to true, autosizing will always be enabled.</p>
586 <p align="left"><strong>10. Rotate</strong> - sets a texture's rotation to a
587 set amount. This can be used with other texture modifiers.<br>
588 Syntax: <font face="Courier New, Courier, mono" size="2">Rotate <em>name,
590 </em></font>Example: <font face="Courier New, Courier, mono" size="2">Rotate
591 Brick1, 30</font></p>
593 <p align="left" style="text-align:left;margin-left:0;margin-right:auto;">This
594 command sets the texture's rotation value. In the example, the Brick1 texture's
595 rotation is set to 30 degrees (clockwise).</p>
597 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>11.
598 RotateAnim</strong> - applies rotation animation to a texture. This can be used
599 with other texture modifiers.<br>
600 Syntax: <font face="Courier New, Courier, mono" size="2">RotateAnim <em>name,
602 </em></font>Example: <font face="Courier New, Courier, mono"
603 size="2">RotateAnim Brick1, 0.2</font></p>
605 <p align="left">This command sets the texture's animated rotation value.
606 <em>Speed</em> is in rotations per second. In the example, the Brick1 texture's
607 rotation animation is set to 0.2 rotations per second.</p>
609 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>12.
610 Scroll</strong> - set's a texture's fixed scrolling value. This can be used
611 with other texture modifiers.<br>
612 Syntax: <font face="Courier New, Courier, mono" size="2">Scroll <em>name,
613 x_offset, y_offset<br>
614 </em></font>Example: <font face="Courier New, Courier, mono" size="2">Scroll
615 Brick1, 0.5, 0.5</font></p>
617 <p align="left">This command sets the texture's scrolling value. In the
618 example, the Brick1 texture is shifted to the right halfway, and shifted up
621 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>13.
622 ScrollAnim</strong> - applies scrolling animation to a texture. This can be
623 used with other texture modifiers.<br>
624 Syntax: <font face="Courier New, Courier, mono" size="2">ScrollAnim <em>name,
626 </em></font>Example: <font face="Courier New, Courier, mono"
627 size="2">ScrollAnim Brick1, 1, 1</font></p>
629 <p align="left">The <em>speed</em> values are the number of full scrolls per
630 second. In the example, the Brick1 texture will scroll to the right once per
631 second, and up once per second.</p>
633 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>14.
634 Scale</strong> - sets a texture's scaling factor. This can be used with other
635 texture modifiers.<br>
636 Syntax: <font face="Courier New, Courier, mono" size="2">Scale <em>name,
638 </em></font>Example: <font face="Courier New, Courier, mono" size="2">Scale
639 Brick1, 30</font></p>
641 <p align="left">In the example, the Brick1 texture is scaled to half the size,
642 in both width and height.</p>
644 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>15.
645 Transform</strong> - sets an advanced transformation method on the texture.
646 This can be used with other texture modifiers, and also can be used multiple
647 times to create multiple transformations.<br>
648 Syntax: <font face="Courier New, Courier, mono" size="2">Transform <em>name,
649 type, wave_type, base, frequency, phase, amplitude<br>
650 </em></font>Example: <font face="Courier New, Courier, mono" size="2">Transform
651 Brick1, rotate, sine, 0.2, 0.2, 0.1, 1.0</font></p>
653 <p align="left">This command applies an advanced transformation method on the
654 texture. Type is the animation type modified, and can either be <em>scroll_x,
655 scroll_y, rotate, </em><em></em><em>scale_x</em><em></em>, or
656 <em>scale</em><em>_y</em>. <em>Wave_type</em> defines the type of waveform
657 applied to the transformation, which creates a variable speed of the animation.
658 The values are <em>sine</em> (a typical sine wave which smoothly loops between
659 min and max values), <em>triangle</em> (an angled wave which increases &
660 decreases at constant speed, changing instantly at the extremes),
661 <em>square</em> (max for half the wavelength, min for the rest with instant
662 transition between), <em>sawtooth</em> (gradual steady increase from min to max
663 over the period with an instant return to min at the end),
664 <em>inverse_sawtooth</em> (gradual steady decrease from max to min over the
665 period, with an instant return to max at the end), or <em>pwm</em> (Pulse Width
666 Modulation; like square, except the high to low transition is controlled by
667 duty cycle). <em>Base</em> is the base value of the wave (base value, the
668 minimum if amplitude > 0, the maximum if amplitude < 0),
669 <em>frequency</em> is the number of wave iterations per second (speed),
670 <em>phase</em> is the offset of the wave start, and <em>amplitude</em> is the
671 size of the wave.</p>
679 <p align="left"><strong><font size="+1"><a name="Floor"></a>5. The
680 <em>Floor</em> Sections</font></strong></p>
682 <p align="left">The Floor section can either be defined as a single floor,
683 using the <em>Floor</em> name, or as a range of floors, using the
684 <em>Floors</em> name.<br>
685 For a single floor, the section would start with this:<br>
686 <font face="Courier New, Courier, mono" size="2"><Floor
687 <em>number</em>></font><br>
688 and end with this:<br>
689 <font face="Courier New, Courier, mono" size="2"><EndFloor></font><br>
690 For example, a floor section for a lobby would use this:<br>
691 <font face="Courier New, Courier, mono" size="2"><Floor 0></font></p>
693 <p align="left">For multiple floors, the section would start with this:<br>
694 <font face="Courier New, Courier, mono" size="2"><Floors <em>start</em> to
695 <em>finish</em>></font><br>
696 and end with this:<br>
697 <font face="Courier New, Courier, mono" size="2"><EndFloors><br>
698 </font>For example, to work with floors 5-10, you would type:<font
699 face="Courier New, Courier, mono" size="2"><br>
700 <Floors 5 to 10></font></p>
702 <p align="left">Floors above ground start with 0 (so a 15-story building would
703 have floors 0-14). Also, floors must be made in the proper order: basement
704 levels must be made first in decending order (-1, -2, -3 etc), and then
705 above-ground floors in ascending order (0, 1, 2, etc).</p>
707 <p align="left"><strong>Variables:</strong></p>
709 <p align="left"><font face="Courier New, Courier, mono"
710 size="2"><strong>%floor%</strong></font> - contains the current floor number<br>
711 <font face="Courier New, Courier, mono"
712 size="2"><strong>%height%</strong></font> - contains the current floor's
714 <font face="Courier New, Courier, mono"
715 size="2"><strong>%interfloorheight%</strong></font> - contains the current
716 floor's interfloor height (spacing between floors)<br>
717 <font face="Courier New, Courier, mono"
718 size="2"><strong>%fullheight%</strong></font> - contains the current floor's
719 total height, including the interfloor height<br>
720 <font face="Courier New, Courier, mono" size="2"><strong>%base%</strong></font>
721 - if the InterfloorOnTop parameter in the Globals section is set to 'false'
722 (the default), then Base refers to the floor's altitude plus interfloor height;
723 otherwise it's the floor's altitude<br>
726 <p align="left"><strong>Parameters:</strong></p>
728 <p align="left"><strong>1. Name</strong> - the name of the current floor,
730 Example: <font face="Courier New, Courier, mono" size="2">Name = Floor
733 <p align="left"><strong>2. ID</strong> - the floor indicator name for the
734 current floor, such as L (for Lobby), LL (lower level), M (Mezzanine), etc.
735 This is also used to determine what texture should be loaded for the elevator
736 floor indicators and floor signs. The texture name would be "Button[ID]" - so
737 if the ID is 10, the texture name would be "Button10".<br>
738 <font face="Courier New, Courier, mono" size="2">ID = %floor%</font></p>
740 <p align="left"><strong>3. Type</strong> - the type of floor the current floor
741 is. The types are still being defined, but the currently used ones are
742 Basement, Lobby, Mezzanine, Conference, Office, Service, Skylobby, Hotel,
743 Apartment, Condominium, Restaurant, Observatory, Recreation, Ballroom,
744 Communications, and Roof. (Required)<br>
745 <font face="Courier New, Courier, mono" size="2">Type = Office</font></p>
747 <p align="left"><strong>4. Description</strong> - description of the current
749 <font face="Courier New, Courier, mono" size="2">Description =
752 <p align="left"><strong>5. Height</strong> - the floor-to-ceiling height of the
753 current floor, required<br>
754 <font face="Courier New, Courier, mono" size="2">Height = 9.5</font></p>
756 <p align="left"><strong>6. InterfloorHeight</strong> - the height in feet of
757 the space between floors (below each floor), starting at the floor's altitude,
758 and ending right below the level's floor; required.<br>
759 <font face="Courier New, Courier, mono" size="2">InterfloorHeight =
762 <p align="left"><strong>7. Altitude</strong> - this parameter is optional and
763 is only recommended if the first level has an interfloor area that needs to be
764 below ground. If this parameter is not used, the altitude will be calculated
766 <font face="Courier New, Courier, mono" size="2">Altitude = -2.24</font></p>
768 <p align="left"><strong>8. Group</strong> - group floors together. This is a
769 list of comma-separated floor numbers (or a range specified with the - symbol)
770 that should be enabled along with this floor when the user arrives at this
771 floor. For example, if a 2-story room has a balcony, and the room base and
772 balcony are separate floors, you would specify the other floor's number in this
775 <font face="Courier New, Courier, mono" size="2">Group = 5</font><br>
776 <font face="Courier New, Courier, mono" size="2">Group = 4, 5<br>
777 Group = 4 - 10</font></p>
780 <strong>Commands:</strong></p>
782 <p align="left"><strong>1. Exit</strong> - exits the current floor section</p>
784 <p align="left"><strong>2. AddFloor</strong> - adds a textured floor with the
785 specified dimensions to the current floor/level<br>
786 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloor <em>name,
787 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
788 <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis, texture_direction,
789 tw</em>, <em>th, isexternal</em></font><br>
790 Example: <font face="Courier New, Courier, mono" size="2">AddFloor My Floor,
791 brick, 0.5, -10, -10, 10, 10, 0, 0, False, False, 0, 0, False</font></p>
793 <p align="left"><em>Voffset1</em> and <em>voffset2</em> are the height in feet
794 above the current floor's altitude; <em>tw</em> and <em>th</em> are to
795 size/tile the texture (0 lets the app autosize them), and <em>isexternal</em>
796 determines if the floor is part of the building's external framework, or is
797 part of the current floor (is either True or False). <em>Name</em> is a
798 user-defined name for the object. The <em>reverse_axis</em> parameter reverses
799 the axis that the difference in altitude/voffset for floors corresponds to. If
800 this is false, and the altitude values are different, the floor will angle
801 upward/downward along the Z axis (front/back), and if set to true, the floor
802 will angle along the X axis (left/right). If <em>texture_direction</em> is
803 false, the texture will be mapped horizontally on the floor; if true, it'll be
804 mapped vertically.</p>
806 <p align="left"><strong>3. AddWall</strong> - adds a textured wall with the
807 specified dimensions to the current floor/level<br>
808 Syntax: <font face="Courier New, Courier, mono" size="2">AddWall <em>name,
809 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
810 <em>z2</em>, <em>height1</em>, <em>height2</em>, <em>voffset1</em>,
811 <em>voffset2</em>, <em>tw</em>, <em>th</em>, <em>isexternal</em></font><br>
812 Example: <font face="Courier New, Courier, mono" size="2">AddWall My Wall,
813 brick, 0.5, -10, -10, 10, 10, 10, 10, 0, 0, 0, 0, False</font></p>
815 <p align="left"><em>Height1</em> is the wall height in feet at the first
816 coordinate set (x1 and z1), and <em>height2</em> is for the second set (x2, and
817 z2). <em>Voffset1</em> is the vertical offset in feet (from the floor's
818 altitude) for the first coordinate set, and <em>voffset2</em> is for the second
819 set. <em>Tw</em> and <em>th</em> are the texture sizing/tiling multipliers, and
820 <em>isexternal</em> determines if the wall is part of the building's external
821 framework (true) or if it's part of the current floor (false).</p>
823 <p align="left"><strong>4. AddInterfloorFloor</strong> - adds a textured floor
824 below the floor of the current floor/level<br>
825 Syntax: <font face="Courier New, Courier, mono" size="2">AddInterfloorFloor
826 <em>name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
827 <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis, texture_direction,
828 tw</em>, <em>th</em></font><br>
829 Example: <font face="Courier New, Courier, mono" size="2">AddInterfloorFloor My
830 IFloor, brick, 0.5, -10, -10, 10, 10, 0, 0, 0, 0</font></p>
832 <p align="left">The parameters are the same as the AddFloor command, except the
833 <em>voffset</em> values are the height offset in feet above the current floor's
834 altitude, and not above the base floor level.</p>
836 <p align="left"><strong>5. AddInterfloorWall</strong> - adds a textured wall
837 below the floor of the current floor/level<br>
838 Syntax: <font face="Courier New, Courier, mono" size="2">AddInterfloorWall
839 <em>name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
840 <em>z2</em>, <em>height1</em>, <em>height2</em>, <em>voffset1</em>,
841 <em>voffset2</em>, <em>tw</em>, <em>th</em></font></p>
843 <p align="left">The parameters are the same as the AddWall command, and the
844 <em>voffset</em> values are the same as the AddInterfloorFloor command.</p>
846 <p align="left"><strong>6. AddShaftFloor</strong> - adds a textured floor to
847 the specified shaft, on the current floor<br>
848 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftFloor
849 <em>number, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
850 <em>x2</em>, <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis,
851 texture_direction, tw</em>, <em>th</em></font><br>
852 Example: <font face="Courier New, Courier, mono" size="2">AddShaftFloor 1, My
853 Floor, brick, 0.5, -10, -10, 10, 10, 0, 0, false, false, 0, 0</font></p>
855 <p align="left">The parameters are the same as the AddFloor command, and the
856 <em>number</em> value is the shaft number to use. The <em>x1</em>, <em>z1</em>,
857 <em>x2,</em> and <em>z2</em> parameters are offsets of the shaft's origin
858 (similar to creating elevator walls and floors)</p>
860 <p align="left"><strong>7. AddShaftWall</strong> - adds a textured wall to the
861 specified shaft, on the current floor<br>
862 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftWall
863 <em>number, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
864 <em>x2</em>, <em>z2</em>, <em>height1</em>, <em>height2</em>,
865 <em>voffset1</em>, <em>voffset2</em>, <em>tw</em>, <em>th</em></font></p>
867 <p align="left">The parameters are the same as the AddWall command, and the
868 <em>number</em> value is the shaft number to use. Also, the <em>x1</em>,
869 <em>z1</em>, <em>x2,</em> and <em>z2</em> parameters are offsets of the shaft's
870 origin (similar to creating elevator walls and floors)</p>
872 <p align="left"><strong>8. AddStairsFloor</strong> - adds a textured floor to
873 the specified stairwell, on the current floor<br>
874 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsFloor
875 <em>number, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
876 <em>x2</em>, <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis,
877 texture_direction, tw</em>, <em>th</em></font><br>
878 Example: <font face="Courier New, Courier, mono" size="2">AddStairsFloor 1, My
879 Floor, brick, 0.5, -10, -10, 10, 10, 0, 0, false, false, 0, 0</font></p>
881 <p align="left">The parameters are the same as the AddFloor command, and the
882 <em>number</em> value is the stairwell number to use</p>
884 <p align="left"><strong>9. AddStairsWall</strong> - adds a textured wall to the
885 specified stairwell, on the current floor<br>
886 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsWall
887 <em>number, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
888 <em>x2</em>, <em>z2</em>, <em>height1</em>, <em>height2</em>,
889 <em>voffset1</em>, <em>voffset2</em>, <em>tw</em>, <em>th</em></font></p>
891 <p align="left">The parameters are the same as the AddWall command, and the
892 <em>number</em> value is the stairwell number to use. Also, the <em>x1</em>,
893 <em>z1</em>, <em>x2</em>, and <em>z2</em> parameters are offsets of the
894 stairwell's origin (similar to creating elevator walls and floors) </p>
896 <p align="left"><strong>10. ColumnWallBox</strong> - creates 4 walls (box) at
897 the specified coordinate locations, as part of the current floor's columnframe
899 Syntax: <font face="Courier New, Courier, mono" size="2">ColumnWallBox
900 <em>name, texturename</em>, <em>x1</em>, <em>x2</em>, <em>z1</em>, <em>z2</em>,
901 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th, inside, outside, top,
902 bottom </em></font><br>
903 Example: <font face="Courier New, Courier, mono" size="2">ColumnWallBox My Box,
904 brick, -10, 10, -10, 10, 15, 0, 0, 0, true, true, true, true</font></p>
906 <p align="left">For parameter information, see the CreateWallBox command above.
907 In this command, the default voffset is the floor's altitude.</p>
909 <p align="left"><strong>11. ColumnWallBox2</strong> - creates 4 walls (box) at
910 a specified central location, as part of the current floor's columnframe mesh
912 Syntax: <font face="Courier New, Courier, mono" size="2">ColumnWallBox2
913 <em>name, texturename</em>, <em>centerx</em>, <em>centerz</em>,
914 <em>widthx</em>, <em>lengthz</em>, <em>height</em>, <em>voffset</em>,
915 <em>tw</em>, <em>th</em><em>, inside, outside, top, bottom </em></font><br>
916 Example: <font face="Courier New, Courier, mono" size="2">ColumnWallBox2 My
917 Box, brick, 0, 0, 10, 10, 15, 0, 0, 0, false, true, false, false</font></p>
919 <p align="left">For parameter information, see the CreateWallBox2 command
920 above. In this command, the default voffset is the floor's altitude.</p>
922 <p align="left"><strong>12. CallButtonElevators</strong> - comma-separated list
923 of elevators the next created call button set will work with (this must be
924 specified before CreateCallButtons)<br>
925 Example: <font face="Courier New, Courier, mono" size="2">CallButtonElevators =
926 1, 2, 3, 4</font></p>
928 <p align="left"><strong>13. CreateCallButtons</strong> - creates a call button
930 Syntax: <font face="Courier New, Courier, mono" size="2">CreateCallButtons
931 <em>BackTexture</em>, <em>UpButtonTexture</em>, <em>UpButtonTexture_Lit,
932 DownButtonTexture, DownButtonTexture_Lit, CenterX, CenterZ, voffset, direction,
933 BackWidth, BackHeight, ShowBack, tw, th<br>
934 </em></font>Example:<font face="Courier New, Courier, mono"
935 size="2"><em></em>Create Marble, CallButtonsUp, CallButtonsUpLit,
936 CallButtonsDown, CallButtonsDownLit, -10, 0, 4, right, 0.5, 1, true, 1,
939 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
942 <p align="left"><em>UpButtonTexture</em> and <em>DownButtonTexture</em> are the
943 textures used for the buttons themselves (unlit). <em>UpButtonTexture_Lit</em>
944 and <em>DownButtonTexture_Lit</em> specify the lit button textures.</p>
946 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
947 of the call button set object</p>
949 <p align="left"><em>voffset</em> is the altitude offset that the object is
952 <p align="left"><em>direction </em>determines the direction the call buttons
954 'front' means they face towards the front of the building<br>
955 'back' means they face towards the back of the building<br>
956 'left' means they face left<br>
957 'right' means they face right</p>
959 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
960 height of the wall plate</p>
962 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
963 and is either true or false</p>
965 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
968 <p align="left">The up and down buttons will be automatically created based on
969 the combined range of the elevators specified with the CallButtonElevators command
972 <p align="left"><strong>14. AddStairs</strong> - creates a custom staircase at
973 the specified location.<br>
974 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairs <em>number,
975 name, texture, direction, CenterX, CenterZ, width, risersize, treadsize,
976 num_stairs, voffset, tw, th</em></font><br>
977 Example: <font face="Courier New, Courier, mono" size="2">AddStairs 1,
978 TestStairs, Brick, left, 10, 15, 5, 0.5, 0.5, 10, 0, 0, 0</font></p>
980 <p align="left">The <em>direction</em> parameter specifies the direction the
981 staircase faces (where the bottom step is), and so if a staircase goes up from
982 left to right, the direction would be <em>left</em>. <em>Width</em> specifies
983 the step width; <em>risersize</em> specifies the height of each step riser
984 (vertical portion); <em>treadsize</em> specifies the length of each step
985 tread/run (horizontal portion); <em>num_stairs</em> specifies the total number
986 of steps to create (including the above landing platform, but not including the
987 base platform). To calculate the length of the staircase, multiply
988 <em>(num_stairs</em> - 1) with <em>treadsize</em>; in the above example, that
989 would be 9 * 0.5. To determine the height of the staircase, multiply
990 <em>num_stairs</em> with <em>risersize</em>. Note that the tread of the top
991 step is not drawn (the top step is the landing platform); therefore for a
992 staircase containing 10 steps, the total staircase width would be comprised of
993 9 treads (which is why the length calculation used num_stairs minus 1).</p>
995 <p align="left"><strong>15. AddDoor</strong> - adds a textured door in the
996 specified location, and performs a wall cut on that area (this must be called
997 after the associated wall is created)<br>
998 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoor <em>opensound,
999 closesound, open, texturename, thickness</em>, <em>direction, speed,
1000 CenterX</em>, <em>CenterZ</em>, <em>width</em>, <em>height</em>,
1001 <em>voffset</em>, <em>tw</em>, <em>th<br>
1002 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddDoor
1003 1, , , False, DoorTexture, 0.2, 1, 0, -8.5, 0, 3.5, 8, 0, 1, 1</font></p>
1005 <p align="left"><em>Direction</em> specifies the direction the door faces (the
1006 side in which the handle is on the left) and also the direction it opens. These
1008 1 - faces left, opens left<br>
1009 2 - faces left, opens right<br>
1010 3 - faces right, opens right<br>
1011 4 - faces right, opens left<br>
1012 5 - faces front, opens front<br>
1013 6 - faces front, opens back<br>
1014 7 - faces back, opens back<br>
1015 8 - faces back, opens front</p>
1017 <p align="left">The default door speed is 75; you can also specify 0 for the
1018 speed to use the system default. The <em>open</em> parameter determines if the
1019 door should be opened on start; default is false. Leave the sound fields blank
1020 for no sounds to be played.<br>
1023 <p align="left"><strong>16. AddStairsDoor</strong> - adds a textured door for
1024 the specified stairwell, in a location relative to the stairwell's center. This
1025 also performs a wall cut on that area (this must be called after the associated
1026 wall is created)<br>
1027 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsDoor
1028 <em>number, opensound, closesound, open, texturename, thickness</em>,
1029 <em>direction, speed, CenterX</em>, <em>CenterZ</em>, <em>width</em>,
1030 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font></p>
1032 <p align="left"><em>Number</em> specifies the stairwell number.
1033 <em>Direction</em> specifies the direction the door faces and also the
1034 direction it opens. For values of this, look at the AddDoor command above.
1035 Leave the <em>sound</em> fields blank for no sounds to be played.</p>
1037 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>17.
1038 AddShaftStdDoor</strong> - adds a standard textured door for the specified
1039 shaft, in a location relative to the shaft's center. This also performs a wall
1040 cut on that area (this must be called after the associated wall is created).
1041 This shouldn't be confused with the AddShaftDoor command, which creates
1042 elevator shaft doors.<br>
1043 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftStdDoor
1044 <em>number, opensound, closesound, open, texturename, thickness</em>,
1045 <em>direction, speed, CenterX</em>, <em>CenterZ</em>, <em>width</em>,
1046 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font><em><br>
1048 Number</em> specifies the stairwell number. <em>Direction</em> specifies the
1049 direction the door faces and also the direction it opens. For values of this,
1050 look at the AddDoor command above. Leave the <em>sound</em> fields blank for no
1051 sounds to be played.</p>
1053 <p align="left"><strong>17. AddDirectionalIndicator</strong> - creates a single
1054 elevator directional indicator/lantern on the current floor (similar to the
1055 CreateCallButtons command) <br>
1056 Syntax: <font face="Courier New, Courier, mono"
1057 size="2">AddDirectionalIndicator<em> Elevator, Relative, ActiveDirection,
1058 Single, Vertical, BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit,
1059 DownTexture, DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth,
1060 BackHeight, ShowBack, tw, th<br>
1061 </em></font>Example: <font face="Courier New, Courier, mono"
1062 size="2"><em>AddDirectionalIndicator 1, true, false, false, true, Metal,
1063 UpLight, UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true,
1064 0, 0</em></font></p>
1066 <p align="left">This command will create a directional indicator on the current
1067 floor (if <em>ActiveDirection</em> is false, then it'll only create it if the
1068 elevator serves that floor). It'll also automatically create the up and down
1069 lights depending on the floor.</p>
1071 <p align="left"><em>Elevator</em> specifies the elevator to create the
1074 <p align="left"><em>Relative</em> determines if the X and Z coordinates are
1075 relative to the elevator's origin (center) or not.</p>
1077 <p align="left"><em>ActiveDirection</em> determines if the indicator should
1078 continuously display the active elevator direction (true), or if it should show
1079 the elevator's direction for the current call (false, default)</p>
1081 <p align="left"><em>Single</em> determines if a single indicator light should
1082 be created instead of two. If this is true, the unlit texture is specified in
1083 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
1085 <p align="left"><em>Vertical</em> determines if the two lights should be
1086 vertically separated (true), or horizontally separated (false)</p>
1088 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
1091 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
1092 used for the lights themselves, and the "Lit" texures are the ones to show when
1093 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
1095 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
1096 of the indicators</p>
1098 <p align="left"><em>voffset</em> is the altitude offset that the object is
1099 above each floor</p>
1101 <p align="left"><em>direction </em>determines the direction the indicators
1103 'front' means they face towards the front of the building<br>
1104 'back' means they face towards the back of the building<br>
1105 'left' means they face left<br>
1106 'right' means they face right</p>
1108 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
1109 height of the wall plate</p>
1111 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
1112 and is either true or false</p>
1114 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
1117 <p align="left"><strong>18. AddShaftDoor</strong> - creates shaft elevator
1118 doors on the current floor only<br>
1119 Syntax: <font face="Courier New, Courier, mono"
1120 size="2">AddShaftDoor<em> elevator, number, lefttexture, righttexture</em>,
1121 <em>thickness, CenterX, CenterZ, voffset, tw, th</em></font><br>
1122 Syntax (with old SetShaftDoors command): <font
1123 face="Courier New, Courier, mono" size="2">AddShaftDoor<em> elevator, number,
1124 lefttexture, righttexture</em>, <em>tw, th</em></font></p>
1126 <p align="left">The AddShaftDoor command creates working shaft elevator doors
1127 on the current floor only - the other command, <em>AddShaftDoors</em> (in the
1128 <em>elevator</em> section) creates all shaft doors in a single command. This
1129 command is useful for specifying different textures for shaft doors depending
1130 on the floor, and also for only creating shaft doors on one side if an elevator
1131 serves a specific floor. The <em>SetShaftDoors</em> command in the elevator
1132 section must be used before using this command. Parameters such as width,
1133 height, and direction are taken from the <em>AddDoors</em> command (so the
1134 regular elevator doors need to be created first). The <em>voffset</em>
1135 parameter allows you to create shaft doors at a different vertical position
1136 than the base of the floor, and the elevator will automatically stop according
1137 to the shaft door's voffset for that floor. These doors should be moved
1138 slightly away from the elevator doors (to separate them both). Also, this
1139 command cuts any shaft walls that are within the door area (and so this must be
1140 called after the shaft walls are created). <em>Number</em> specifies the number
1141 of the door to create (related to the <em>Doors</em> command) - if the elevator
1142 only has one door, or if the <em>Doors</em> command was not used, specify 1
1143 here. Note that for filler walls to be created automatically, the names of the
1144 surrounding walls (shaft and outer floor walls) must contain the word
1147 <p align="left"><strong>19. AddFloorIndicator</strong> - creates a floor
1148 indicator associated with a specific elevator<br>
1149 Syntax: <font face="Courier New, Courier, mono"
1150 size="2">AddFloorIndicator<em> elevator, relative, texture_prefix, direction,
1151 CenterX, CenterZ, width, height, voffset</em></font> </p>
1153 <p align="left">The AddFloorIndicator command creates a floor indicator at the
1154 position specified by <em>CenterX</em> and <em>CenterZ</em>, associated with
1155 the elevator specified by <em>elevator</em>. <em>Direction</em> is the
1156 direction the indicator faces, and can be either "left", "right", "front" or
1157 "back". <em>Relative</em> determines if the <em>CenterX</em> and
1158 <em>CenterZ</em> values are relative of the elevator's center or not. This
1159 command can be given multiple times to create multiple indicators.
1160 <em>Texture_prefix</em> is the base name of the texture to load when displaying
1161 a floor ID; for example if the indicator is on floor 3, and you specify a
1162 prefix of "Button", it'll load the "Button3" texture.</p>
1164 <p align="left"><strong>20. Cut</strong> - performs a manual box cut on an area
1165 within the current floor<br>
1166 Syntax: <font face="Courier New, Courier, mono" size="2">Cut <em>x1, y1, z1,
1167 x2, y2, z2, cutwalls, cutfloors</em><br>
1168 </font>Example: <font face="Courier New, Courier, mono" size="2">Cut -5, -5,
1169 -5, 5, 5, 5, false, true</font></p>
1171 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
1172 start and end coordinates of the box cut. The Y values are relative to the
1173 current floor's altitude. If <em>cutwalls</em> is true, the function will cut
1174 walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
1176 <p align="left"><strong>21. CutAll</strong> - performs a manual box cut on all
1177 objects associated with the current floor (the level itself, interfloor,
1178 shafts, stairs and external)<br>
1179 Syntax: <font face="Courier New, Courier, mono" size="2">CutAll <em>x1, y1, z1,
1180 x2, y2, z2, cutwalls, cutfloors</em><br>
1181 </font>Example: <font face="Courier New, Courier, mono" size="2">CutAll -5, -5,
1182 -5, 5, 5, 5, false, true</font></p>
1184 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
1185 start and end coordinates of the box cut. The Y values are relative to the
1186 current floor's altitude. If <em>cutwalls</em> is true, the function will cut
1187 walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
1189 <p align="left"><strong>22. AddFillerWalls</strong> - helper function to add
1190 fillers around a door's cut location. When a door is created, the wall in it's
1191 location is cut to provide space; after the cut, the sides are open (if the
1192 wall has thickness) - this creates a covering wall on each side and a floor
1193 above the door frame to fill the area.<br>
1194 Syntax: <font face="Courier New, Courier, mono" size="2">AddFillerWalls
1195 <em>texture, thickness, CenterX, CenterZ, width, height, voffset, direction,
1197 </font>Example: <font face="Courier New, Courier, mono" size="2">AddFillerWalls
1198 ConnectionWall, 0.5, -10, 0, 3.5, 8, 0, true, 0, 0</font></p>
1200 <p align="left">The parameters in this function are similar to the related
1201 door's parameters. <em>Direction</em> is either true if the door faces the
1202 front/back (width is along the X axis), or false if the door faces left/right
1203 (width is along the Z axis).</p>
1205 <p align="left"><strong>23. AddSound</strong> - creates a user-defined sound at
1206 the specified position<br>
1207 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
1208 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
1209 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
1210 direction_x, direction_y, direction_z]</em></font><br>
1211 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
1212 sound.wav, 10, 100, 5, true<br>
1213 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
1214 MySound, sound.wav, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
1217 <p align="left">For information on the parameters, see the AddSound command in
1218 the Globals section. The only difference here is that the Y value is relative
1219 of the floor's base (altitude plus interfloor height). <em>Loop</em> specifies
1220 if the sound should loop and play on startup.</p>
1222 <p align="left"><strong>24. AddShaftDoorComponent</strong> - creates a single
1223 shaft door component, used for creating custom door styles<br>
1224 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoorComponent
1225 <em>elevator, number, name, texture, sidetexture, thickness, direction,
1226 openspeed, closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
1227 side_th</em></font></p>
1229 <p align="left">This command is almost identical to the AddDoorComponent
1230 command (in the elevator section below - see that for more information), except
1231 that it creates shaft doors. Use the FinishShaftDoor command after creating the
1232 components. The components don't need to line up with the floor's base; the
1233 elevator will automatically stop at the base of the shaft door for each floor.
1234 This command replaces the AddShaftDoor command.</p>
1236 <p align="left"><strong>25. FinishShaftDoor</strong> - finishes shaft door
1237 creation - use this after all related AddShaftDoorComponent commands are used,
1238 or specify it without the AddShaftDoorComponent commands if you're creating a
1239 manual shaft door.<br>
1240 Syntax: <font face="Courier New, Courier, mono"
1241 size="2">FinishShaftDoor<em> elevator, number[, create_walls]</em></font></p>
1243 <p align="left">This command is almost identical to the FinishDoors command (in
1244 the elevator section below - see that for more information) except that it's
1245 used for finishing a shaft door. Note that for filler walls to be created
1246 automatically, the names of the surrounding walls (shaft and outer floor walls)
1247 must contain the word "Shaft".</p>
1249 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>26.
1250 AddModel</strong> - adds a 3D model to the floor. The model's
1251 textures/materials must be defined in a separate ".material" file, and a
1252 separate collider mesh ".collider" will be loaded. If a collider mesh isn't
1253 available, a simple box collider will be created.<br>
1254 Syntax: <font face="Courier New, Courier, mono" size="2">AddModel<em> name,
1255 filename, center, CenterX, CenterY, CenterZ, RotationX, RotationY, RotationZ,
1256 MaxRenderDistance, ScaleMultiplier, EnablePhysics, Restitution, Friction,
1258 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
1259 MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font><br>
1260 Example:<font face="Courier New, Courier, mono" size="2"> AddModel MyModel,
1261 cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, true, 0.1, 0.5, 0.1</font></p>
1265 <p align="left">The <em>Center</em> value is either true or false, and
1266 determines if the loaded model should be automatically centered, otherwise the
1267 exact mesh positioning in the model file will be used. The <em>CenterY</em>
1268 value is relative to the current floor's base. <em>MaxRenderDistance</em>
1269 determines the maximum distance in feet that the object will be shown (0 means
1270 unlimited). <em>ScaleMultiplier</em> allows you to change the size of the
1271 object during the load - for example, set to 2 to double the size. Models are
1272 in the OGRE native mesh format. In the example, the material/texture file is
1273 cube.material, and the optional collider mesh file is cube.collider.
1274 <em>EnablePhysics</em> enables Bullet physics on the object (physics will only
1275 work if you don't provide a collider mesh), and <em>Restitution</em>,
1276 <em>Friction</em> and <em>Mass</em> determine the physical properties of the
1279 <p align="left"><strong>27. AddStairsModel</strong> - adds a 3D model to the
1280 specified stairwell, on the current floor. See the AddModel command above for
1281 parameter information.<br>
1282 Syntax: <font face="Courier New, Courier, mono"
1283 size="2">AddStairsModel<em> number, name, filename, center, CenterX, CenterY,
1284 CenterZ, RotationX, RotationY, RotationZ, MaxRenderDistance, ScaleMultiplier,
1285 EnablePhysics, Restitution, Friction, Mass</em><em><br>
1286 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
1287 1, MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font></p>
1289 <p align="left">The <em>CenterY</em> value is relative to the current floor's
1292 <p align="left"><strong>28. AddShaftModel</strong> - adds a 3D model to the
1293 specified shaft, on the current floor. See the AddModel command above for
1294 parameter information.<br>
1295 Syntax: <font face="Courier New, Courier, mono"
1296 size="2">AddShaftModel<em> number, name, filename, center, CenterX, CenterY,
1297 CenterZ, RotationX, RotationY, RotationZ, MaxRenderDistance, ScaleMultiplier,
1298 EnablePhysics, Restitution, Friction, Mass</em><em><br>
1299 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
1300 1, MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font></p>
1302 <p align="left">The <em>CenterY</em> value is relative to the current floor's
1305 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>29.
1306 AddActionControl</strong> - creates a custom control that uses a specific
1307 action defined by AddAction.<br>
1308 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
1309 <em>name, sound, direction, centerx, centerz, width, height, voffset,
1310 action_name(s), texture_name(s)<br>
1311 </em></font>Example: <font face="Courier New, Courier, mono"
1312 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
1313 UndoMyAction, MyAction, Touch, TouchLit<br>
1315 AddActionControl command creates an advanced control similar to elevator button
1316 panel controls, but assigned to an action created with the AddAction command.
1317 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
1318 to specify a list of actions, and a list of textures to go along with those
1319 actions. There needs to be a texture for every action; if you specify 3 actions
1320 and only 2 textures, you will get an error. The control starts up in the first
1321 action, and switches to the next actions in sequence when it's clicked.
1322 <em>Direction</em> is the direction the control itself will face in 3D space
1323 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1324 Leave the <em>sound</em> field blank for no sound to be played.</p>
1326 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>30.
1327 AddShaftActionControl</strong> - creates a custom control in a specified shaft
1328 that uses a specific action defined by AddAction.<br>
1329 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftActionControl
1330 <em>number, name, sound, direction, centerx, centerz, width, height, voffset,
1331 action_name(s), texture_name(s)<br>
1332 </em></font>Example: <font face="Courier New, Courier, mono"
1333 size="2">AddShaftActionControl 1, MyControl, switch.wav, front, -10, 10, 1.5,
1334 1.5, 4, UndoMyAction, MyAction, Touch, TouchLit<br>
1336 This command creates an advanced control similar to elevator button panel
1337 controls, but assigned to an action created with the AddAction command. The
1338 <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you to
1339 specify a list of actions, and a list of textures to go along with those
1340 actions. There needs to be a texture for every action; if you specify 3 actions
1341 and only 2 textures, you will get an error. The control starts up in the first
1342 action, and switches to the next actions in sequence when it's clicked.
1343 <em>Direction</em> is the direction the control itself will face in 3D space
1344 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1345 Leave the <em>sound</em> field blank for no sound to be
1346 played.<strong></strong></p>
1348 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>31.
1349 AddStairsActionControl</strong> - creates a custom control in a specified
1350 stairwell that uses a specific action defined by AddAction.<br>
1351 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsActionControl
1352 <em>number, name, sound, direction, centerx, centerz, width, height, voffset,
1353 action_name(s), texture_name(s)<br>
1354 </em></font>Example: <font face="Courier New, Courier, mono"
1355 size="2">AddStairsActionControl 1, MyControl, switch.wav, front, -10, 10, 1.5,
1356 1.5, 4, UndoMyAction, MyAction, Touch, TouchLit<br>
1358 This command creates an advanced control similar to elevator button panel
1359 controls, but assigned to an action created with the AddAction command. The
1360 <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you to
1361 specify a list of actions, and a list of textures to go along with those
1362 actions. There needs to be a texture for every action; if you specify 3 actions
1363 and only 2 textures, you will get an error. The control starts up in the first
1364 action, and switches to the next actions in sequence when it's clicked.
1365 <em>Direction</em> is the direction the control itself will face in 3D space
1366 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1367 Leave the <em>sound</em> field blank for no sound to be
1368 played.<strong></strong></p>
1370 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>32.
1371 AddTrigger</strong> - creates a trigger that is used to signal an action when
1372 the user's camera enters or leaves the defined area.<br>
1373 Syntax: <font face="Courier New, Courier, mono" size="2">AddTrigger <em>name,
1374 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
1375 </em></font>Example:<font face="Courier New, Courier, mono"
1376 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
1377 UndoMyAction, MyAction</font><br>
1379 AddTrigger creates a trigger similar to action controls (AddActionControl) and
1380 elevator controls. The <em>action_names(s)</em> parameter allows you to specify
1381 a list of actions that this trigger will call when the camera enters or exits
1382 the area. The trigger starts in the first action, and will switch to each
1383 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
1384 <em>Z</em> parameters specify the 3D box that defines the trigger area. Y is
1385 relative of the floor's base. Leave the <em>sound</em> field blank for no sound
1388 <p align="left"><strong></strong></p>
1390 <p align="left"><strong><font size="+1"><a name="Elevator"></a>6. The
1391 <em>Elevator</em> Section</font></strong></p>
1393 <p align="left">The <em>Elevator</em> section allows you to create elevators
1394 for your building. Elevators are numbered, starting with 1. Parameters that
1395 have defaults listed are optional.</p>
1397 <p align="left">The section headers and footers are similar to the ones in the
1399 To specify a single elevator, you would type something like:<br>
1400 <font face="Courier New, Courier, mono" size="2"><Elevator 1></font><br>
1401 and end it with:<br>
1402 <font face="Courier New, Courier, mono" size="2"><EndElevator></font><br>
1404 For a range of elevators, you would use something like:<br>
1405 <font face="Courier New, Courier, mono" size="2"><Elevators 2 to
1408 <font face="Courier New, Courier, mono" size="2"><EndElevators></font></p>
1410 <p align="left"><strong>Variables:</strong></p>
1412 <p align="left"><font face="Courier New, Courier, mono"
1413 size="2"><strong>%elevator%</strong></font> - number of the current elevator</p>
1415 <p align="left"><strong>Parameters</strong>:</p>
1417 <p align="left"><strong>1. Name</strong> - sets the name of the elevator<br>
1418 Example: <font face="Courier New, Courier, mono" size="2">Name = Service
1421 <p align="left"><strong>2. Speed</strong> - maximum speed of the elevator, in
1423 Example: <font face="Courier New, Courier, mono" size="2">Speed = 20</font></p>
1425 <p align="left"><strong>3. Acceleration</strong> - acceleration speed of the
1426 elevator, in feet per second<br>
1427 Example: <font face="Courier New, Courier, mono" size="2">Acceleration =
1430 <p align="left"><strong>4. Deceleration</strong> - deceleration speed of the
1431 elevator, in feet per second<br>
1432 Example: <font face="Courier New, Courier, mono" size="2">Deceleration =
1435 <p align="left"><strong>5. OpenSpeed</strong> - open/close speed of the
1436 elevator doors. This must be specified after the CreateElevator command.<br>
1437 Syntax: <font face="Courier New, Courier, mono" size="2">OpenSpeed
1438 <em>doornumber</em> = <em>value</em></font><br>
1439 Example: <font face="Courier New, Courier, mono" size="2">OpenSpeed 1 =
1442 <p align="left"><strong>6. SlowSpeed</strong> - open/close speed multiplier of
1443 the elevator doors used for slow movement, usually nudge mode. The default is
1444 0.5, which ends up being half of the door's speed value. This must be specified
1445 after the CreateElevator command.<br>
1446 Syntax: <font face="Courier New, Courier, mono" size="2">SlowSpeed
1447 <em>doornumber</em> = <em>value</em></font><br>
1448 Example: <font face="Courier New, Courier, mono" size="2">SlowSpeed 1 =
1451 <p align="left"><strong>7. ManualSpeed</strong> - open/close speed multiplier
1452 of the elevator doors used for manual movement. The default is 0.2. This must
1453 be specified after the CreateElevator command.<br>
1454 Syntax: <font face="Courier New, Courier, mono" size="2">ManualSpeed
1455 <em>doornumber</em> = <em>value</em></font><br>
1456 Example: <font face="Courier New, Courier, mono" size="2">ManualSpeed 1 =
1459 <p align="left"><strong>8. ServicedFloors</strong> - a comma-separated list of
1460 floors this elevator services. Ranges can also be specified by putting a "-"
1461 between the numbers<br>
1462 Example: <font face="Courier New, Courier, mono" size="2">ServicedFloors = 0,
1463 5, 6, 7-30, 31</font></p>
1465 <p align="left"><strong>9. AssignedShaft</strong> - the shaft number this
1467 Example: <font face="Courier New, Courier, mono" size="2">AssignedShaft =
1470 <p align="left"><strong>10. DoorTimer</strong> - the length of time (in
1471 milliseconds) that the elevator doors should stay open before automatically
1472 closing. Specify 0 to disable. The default is 5000, or 5 seconds. This must be
1473 specified after the CreateElevator command.<br>
1474 Syntax: <font face="Courier New, Courier, mono" size="2">DoorTimer
1475 <em>doornumber</em> = <em>value</em></font><br>
1476 Example: <font face="Courier New, Courier, mono" size="2">DoorTimer 1 =
1479 <p align="left"><strong>11. QuickClose</strong> - the length of time (in
1480 milliseconds) that the elevator doors should stay open before automatically
1481 closing, in quick-close mode. Specify 0 to disable. The default is 3000, or 3
1482 seconds. This must be specified after the CreateElevator command.<br>
1483 Syntax: <font face="Courier New, Courier, mono" size="2">QuickClose
1484 <em>doornumber</em> = <em>value</em></font><br>
1485 Example: <font face="Courier New, Courier, mono" size="2">QuickClose 1 =
1488 <p align="left"><strong>12. NudgeTimer</strong> - the length of time (in
1489 seconds) that the doors have to remain open before the elevator activates nudge
1490 mode for the related door. Specify 0 to disable. The default is 30 seconds.
1491 This must be specified after the CreateElevator command.<br>
1492 Syntax: <font face="Courier New, Courier, mono" size="2">NudgeTimer
1493 <em>doornumber</em> = <em>value</em></font><br>
1494 Example: <font face="Courier New, Courier, mono" size="2">NudgeTimer 1 =
1497 <p align="left"><strong>13. OpenSound</strong> - the sound file to play when
1498 the elevator doors open. Default is <em>elevatoropen.wav</em>. Leave the
1499 filename field blank for no sound. This must be specified after the
1500 CreateElevator command.<br>
1501 Syntax: <font face="Courier New, Courier, mono" size="2">OpenSound
1502 <em>doornumber</em> = <em>filename</em></font><br>
1503 Example: <font face="Courier New, Courier, mono" size="2">OpenSound 1 =
1506 <p align="left"><strong>14. CloseSound</strong> - the sound file to play when
1507 the elevator doors close. Default is <em>elevatorclose.wav</em>. Leave the
1508 filename field blank for no sound. This must be specified after the
1509 CreateElevator command.<br>
1510 Syntax: <font face="Courier New, Courier, mono" size="2">CloseSound
1511 <em>doornumber</em> = <em>filename</em></font><br>
1512 Example: <font face="Courier New, Courier, mono" size="2">CloseSound 1 =
1513 close.wav</font></p>
1515 <p align="left"><strong>15. CarStartSound, CarUpStartSound,
1516 CarDownStartSound</strong> - the sound file to play when the elevator starts
1517 moving/speeds up. Leave the filename field blank for no sound. By default no
1518 sound is played. The first command specifies both up and down sounds, while the
1519 others are for either upwards movement or downwards movement.<br>
1520 Example: <font face="Courier New, Courier, mono" size="2">CarStartSound =
1521 start.wav</font></p>
1523 <p align="left"><strong>16. CarMoveSound, CarUpMoveSound,
1524 CarDownMoveSound</strong> - the sound file to play while the elevator is
1525 moving. This file is automatically looped by the simulator. By default no sound
1526 is played. Leave the filename field blank for no sound. The first command
1527 specifies both up and down sounds, while the others are for either upwards
1528 movement or downwards movement.<br>
1529 Example: <font face="Courier New, Courier, mono" size="2">CarMoveSound =
1532 <p align="left"><strong>17. CarStopSound, CarUpStopSound,
1533 CarDownStopSound</strong> - the sound file to play when the elevator slows down
1534 and stops. By default no sound is played. Leave the filename field blank for no
1535 sound. The first command specifies both up and down sounds, while the others
1536 are for either upwards movement or downwards movement.<br>
1537 Example: <font face="Courier New, Courier, mono" size="2">CarStopSound =
1540 <p align="left"><strong>18. CarIdleSound</strong> - the sound file to play when
1541 the elevator is idle (generally the fan sound). Default is
1542 <em>elevidle.wav</em>. Leave the filename field blank for no sound. <br>
1543 Example: <font face="Courier New, Courier, mono" size="2">CarIdleSound =
1546 <p align="left"><strong>19. MotorStartSound, MotorUpStartSound,
1547 MotorDownStartSound</strong> - the sound file to play when the elevator motor
1548 starts moving/speeds up (sets both directions). Default is
1549 <em>elevstart.wav</em>. Leave the filename field blank for no sound. The first
1550 command specifies both up and down sounds, while the others are for either
1551 upwards movement or downwards movement.<br>
1552 Example: <font face="Courier New, Courier, mono" size="2">MotorStartSound =
1553 start.wav</font></p>
1555 <p align="left"><strong>20. MotorRunSound, MotorUpRunSound,
1556 MotorDownRunSound</strong> - the sound file to play while the elevator motor is
1557 running (sets both directions). This file is automatically looped by the
1558 simulator. Default is <em>elevmove.wav</em>. Leave the filename field blank for
1559 no sound. The first command specifies both up and down sounds, while the others
1560 are for either upwards movement or downwards movement.<br>
1561 Example: <font face="Courier New, Courier, mono" size="2">MotorRunSound =
1564 <p align="left"><strong>21. MotorStopSound, MotorUpStopSound,
1565 MotorDownStopSound</strong> - the sound file to play when the elevator motor
1566 slows down and stops (sets both directions). Default is <em>elevstop.wav</em>.
1567 Leave the filename field blank for no sound. The first command specifies both
1568 up and down sounds, while the others are for either upwards movement or
1569 downwards movement.<br>
1570 Example: <font face="Courier New, Courier, mono" size="2">MotorStopSound =
1573 <p align="left"><strong>22. MotorIdleSound</strong> - the sound file to play
1574 when the elevator motor is idling. There is no default yet. Leave the filename
1575 field blank for no sound. <br>
1576 Example: <font face="Courier New, Courier, mono" size="2">MotorIdleSound =
1579 <p align="left"><strong>23. ChimeSound</strong> - the sound file to play when
1580 the elevator arrives at a floor. Default is <em>chime1.wav</em>. This must be
1581 specified after the CreateElevator command. This is used for both up and down
1582 chimes. Leave the filename field blank for no sound. <br>
1583 Syntax: <font face="Courier New, Courier, mono" size="2">ChimeSound
1584 <em>doornumber</em> = <em>filename</em></font><br>
1585 Example: <font face="Courier New, Courier, mono" size="2">ChimeSound 1 =
1586 chime.wav</font></p>
1588 <p align="left"><strong>24. UpChimeSound</strong> - the sound file to play when
1589 the elevator arrives at a floor and it's direction is up. Default is
1590 <em>chime1.wav</em>. Leave the filename field blank for no sound. This must be
1591 specified after the CreateElevator command.<br>
1592 Syntax: <font face="Courier New, Courier, mono" size="2">UpChimeSound
1593 <em>doornumber</em> = <em>filename</em></font><br>
1594 Example: <font face="Courier New, Courier, mono" size="2">UpChimeSound 1 =
1595 chime.wav</font></p>
1597 <p align="left"><strong>25. DownChimeSound</strong> - the sound file to play
1598 when the elevator arrives at a floor and it's direction is down. Default is
1599 <em>chime1.wav</em>. Leave the filename field blank for no sound. This must be
1600 specified after the CreateElevator command.<br>
1601 Syntax: <font face="Courier New, Courier, mono" size="2">DownChimeSound
1602 <em>doornumber</em> = <em>filename</em></font><br>
1603 Example: <font face="Courier New, Courier, mono" size="2">DownChimeSound 1 =
1604 chime.wav</font></p>
1606 <p align="left"><strong>26. AlarmSound</strong> - the sound file to play when
1607 the elevator alarm button is pressed. Default is <em>bell1.wav</em>. Leave the
1608 filename field blank for no sound. <br>
1609 Example: <font face="Courier New, Courier, mono" size="2">AlarmSound =
1610 bell2.wav</font></p>
1612 <p align="left"><strong>27. AlarmSoundStop</strong> - the sound file to play
1613 when the elevator alarm button is released. Leave the filename field blank for
1614 no sound. Default is <em>bell1-stop.wav</em>.<br>
1615 Example: <font face="Courier New, Courier, mono" size="2">AlarmSoundStop =
1616 bell2-stop.wav</font></p>
1618 <p align="left"><strong>28. BeepSound</strong> - the sound file to play when
1619 the elevator reaches a new floor. There is no default; if this is set, the
1620 beeps will be automatically enabled. If an asterisk (*) is specified, it is
1621 replaced with the current floor number.<br>
1622 Example: <font face="Courier New, Courier, mono" size="2">BeepSound =
1625 <p align="left"><strong>29. FloorSound</strong> - the sound file(s) to play
1626 when the elevator arrives at a floor; normally this is used for files that
1627 speak the floor number. There is no default; if this is set, the sounds will be
1628 automatically enabled. If an asterisk (*) is specified, it is replaced with the
1629 current floor number.<br>
1630 Example: <font face="Courier New, Courier, mono" size="2">FloorSound =
1631 floor*.wav</font></p>
1633 <p align="left"><strong>30. UpMessage</strong> - the notification sound file(s)
1634 to play after the elevator arrives at a floor and the doors open - this tells
1635 the passengers that the elevator is going up. There is no default; if this is
1636 set, the sound will be automatically enabled. If an asterisk (*) is specified,
1637 it is replaced with the current floor number.<br>
1638 Example: <font face="Courier New, Courier, mono" size="2">UpMessage =
1639 goingup.wav</font></p>
1641 <p align="left"><strong>31. DownMessage</strong> - the notification sound
1642 file(s) to play after the elevator arrives at a floor and the doors open - this
1643 tells the passengers that the elevator is going down. There is no default; if
1644 this is set, the sound will be automatically enabled. If an asterisk (*) is
1645 specified, it is replaced with the current floor number.<br>
1646 Example: <font face="Courier New, Courier, mono" size="2">DownMessage =
1647 goingdown.wav</font></p>
1649 <p align="left"><strong>32. OpenMessage</strong> - the notification sound
1650 file(s) to play when the elevator doors begin opening - this tells the
1651 passengers that the doors are opening. There is no default; if this is set, the
1652 sound will be automatically enabled. If an asterisk (*) is specified, it is
1653 replaced with the current floor number.<br>
1654 Example: <font face="Courier New, Courier, mono" size="2">OpenMessage =
1655 doorsopening.wav</font></p>
1657 <p align="left"><strong>33. CloseMessage</strong> - the notification sound
1658 file(s) to play when the elevator doors begin closing - this tells the
1659 passengers that the doors are closing. There is no default; if this is set, the
1660 sound will be automatically enabled. If an asterisk (*) is specified, it is
1661 replaced with the current floor number.<br>
1662 Example: <font face="Courier New, Courier, mono" size="2">CloseMessage =
1663 doorsclosing.wav</font></p>
1665 <p align="left"><strong>34. Music</strong> - the sound file to play for the
1666 elevator music - the sound is automatically looped. There is no default; if
1667 this is set, the sound will be automatically enabled. <br>
1668 Example: <font face="Courier New, Courier, mono" size="2">Music =
1669 musicfile.wav</font></p>
1671 <p align="left"><strong>35. NudgeSound</strong> - the sound file to play while
1672 in nudge mode. Default is <em>buzz.wav</em>. Leave the filename field blank for
1673 no sound. This must be specified after the CreateElevator command.<br>
1674 Syntax: <font face="Courier New, Courier, mono" size="2">NudgeSound
1675 <em>doornumber</em> = <em>filename</em></font><br>
1676 Example: <font face="Courier New, Courier, mono" size="2">NudgeSound 1 =
1679 <p align="left"><strong>36. FloorSkipText</strong> - sets the text that will be
1680 shown in the floor indicator when passing non-serviced floors. The texture for
1681 this must be loaded for it to show (and will start with the related indicator's
1682 texture prefix) - of you set this to EX for example, and the indicator's
1683 texture prefix is "Button", the texture it'll load will be ButtonEX.jpg. Common
1684 values for this are EZ, X, and EX (which stand for Express Zone).<br>
1685 Example: <font face="Courier New, Courier, mono" size="2">FloorSkipText = EZ
1688 <p align="left"><strong>37. RecallFloor</strong> - sets the floor the elevator
1689 will recall to during fire service phase 1 mode. Default is the lowest serviced
1691 Example: <font face="Courier New, Courier, mono" size="2">RecallFloor =
1694 <p align="left"><strong>38. AlternateRecallFloor</strong> - sets the alternate
1695 floor the elevator will recall to during fire service phase 1 mode. Default is
1696 the highest serviced floor. <br>
1697 Example: <font face="Courier New, Courier, mono" size="2">AlternateRecallFloor
1700 <p align="left"><strong>39. ACP</strong> - enables ACP (Anti-Crime Protection)
1702 Example: <font face="Courier New, Courier, mono" size="2">ACP = true</font></p>
1704 <p align="left"><strong>40. ACPFloor</strong> - sets the floor the elevator
1705 will stop at while in ACP mode. Default is the lowest serviced floor. <br>
1706 Example: <font face="Courier New, Courier, mono" size="2">ACPFloor =
1709 <p align="left"><strong>41. Doors</strong> - sets the number of doors the
1710 elevator will have. The default is 1. Set to 0 in order to have a doorless
1712 Example: <font face="Courier New, Courier, mono" size="2">Doors = 2</font></p>
1714 <p align="left"><strong>42. MotorPosition</strong> - sets the position of the
1715 motor sound emitter; if this command is not specified, it'll be placed at the
1716 base (altitude + interfloor) of the highest floor in the corresponding shaft.
1717 The X and Z values are relative of the elevator center.<br>
1718 Syntax: <font face="Courier New, Courier, mono" size="2">MotorPosition = <em>x,
1720 </font>Example: <font face="Courier New, Courier, mono" size="2">MotorPosition
1721 = 0, 100, 0</font></p>
1723 <p align="left"><strong>43. QueueResets</strong> - set this to true if you want
1724 the elevator to reset the related queue (up or down) after it reaches the last
1725 valid entry. If the elevator is moving up for example with this setting on, and
1726 you press buttons for floors below you, the elevator will remove those entries
1727 after it reaches the highest selected floor. The elevator will only be
1728 available for hall calls in the active queue direction.<br>
1729 Example: <font face="Courier New, Courier, mono" size="2">QueueResets =
1732 <p align="left"><strong>44. LimitQueue</strong> - set this to true to only
1733 allow floor selections in the same direction as the active elevator queue
1734 direction to be placed. For example, if the elevator is moving up, and a button
1735 is pressed for a lower floor, this will prevent that from being queued. The
1736 elevator will only be available for hall calls in the active queue
1738 Example: <font face="Courier New, Courier, mono" size="2">LimitQueue =
1741 <p align="left"><strong>45. UpPeak</strong> - enables up peak mode for this
1743 Example: <font face="Courier New, Courier, mono" size="2">UpPeak =
1746 <p align="left"><strong>46. DownPeak</strong> - enables down peak mode for this
1748 Example: <font face="Courier New, Courier, mono" size="2">DownPeak =
1751 <p align="left"><strong>47. IndependentService</strong> - enables independent
1752 service mode for this elevator.<br>
1753 Example: <font face="Courier New, Courier, mono" size="2">IndependentService =
1756 <p align="left"><strong>48. InspectionService</strong> - enables inspection
1757 service mode for this elevator.<br>
1758 Example: <font face="Courier New, Courier, mono" size="2">InspectionService =
1761 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>49.
1762 InspectionSpeed</strong> - speed multiplier for inspection service (if set to
1763 0.6, would be 60% of elevator speed)<br>
1764 Syntax: <font face="Courier New, Courier, mono" size="2">InspectionSpeed =
1765 <em>multiplier</em></font></p>
1767 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>50.
1768 Parking</strong> - enables automatic elevator parking. If this option is used,
1769 the elevator will automatically send itself to the specified parking floor
1770 after the number of seconds specified in <em>delay</em>. <br>
1771 Syntax: <font face="Courier New, Courier, mono" size="2">Parking = <em>floor,
1772 delay</em></font></p>
1774 <p align="left"><strong>51. LevelingSpeed</strong> - elevator's leveling speed.
1776 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingSpeed =
1777 <em>speed</em></font></p>
1779 <p align="left"><strong>52. LevelingOffset</strong> - distance in feet from the
1780 destination floor that the elevator will switch into leveling mode. Default is
1782 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingOffset =
1783 <em>distance</em></font></p>
1785 <p align="left"><strong>53. LevelingOpen</strong> - distance in feet from the
1786 destination floor that the elevator will open the doors. Default is 0.<br>
1787 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingOpen =
1788 <em>distance</em></font></p>
1790 <p align="left"><strong>54. NotifyEarly</strong> - changes behavior of arrival
1791 notifications (chime, lighting of directional indicator, and floor announcement
1792 sound). 0 is the default and notifies when the elevator stops on the floor. 1
1793 notifies when the elevator starts the leveling process, and 2 notifies when the
1794 elevator starts decelerating.<br>
1795 Syntax: <font face="Courier New, Courier, mono" size="2">NotifyEarly =
1796 <em>value</em></font></p>
1798 <p align="left"><strong>55. MusicPosition</strong> - sets the position of the
1799 music sound emitter relative of the elevator's position. If this command is not
1800 specified, it'll be placed in the center of the elevator on the ceiling.<br>
1801 Syntax: <font face="Courier New, Courier, mono" size="2">MusicPosition = <em>x,
1803 </font>Example: <font face="Courier New, Courier, mono" size="2">MusicPosition
1804 = 0, 8, 0</font></p>
1806 <p align="left"><strong>56. DepartureDelay</strong> - sets the time in seconds
1807 that the elevator waits before proceeding to the next floor. Default is 0.<br>
1808 Syntax: <font face="Courier New, Courier, mono" size="2">DepartureDelay =
1809 <em>1</em> </font></p>
1811 <p align="left"><strong>57. ArrivalDelay</strong> - sets the time in seconds
1812 that the elevator waits before opening the doors after arriving at a floor. The
1813 default is 0. Note that a value greater than 0 will switch off the LevelingOpen
1815 Syntax: <font face="Courier New, Courier, mono" size="2">ArrivalDelay =
1816 <em>0.5</em></font></p>
1818 <p align="left"><strong>58. DisplayFloors</strong> - sets the floors that will
1819 be displayed by the elevator's indicators. This command uses the same syntax as
1820 the ServicedFloors command.<br>
1821 Syntax: <font face="Courier New, Courier, mono" size="2">DisplayFloors = <em>0,
1822 9, 19, 29</em></font></p>
1824 <p align="left"><strong>59. FireService1</strong> - sets the fire service phase
1825 1 mode that the elevator will start with. Default is 0. Values are 0 for off, 1
1826 for on, 2 for bypass.<br>
1827 Syntax: <font face="Courier New, Courier, mono" size="2">FireService1 =
1830 <p align="left"><strong>60. FireService2</strong> - sets the fire service phase
1831 2 mode that the elevator will start with. Default is 0. Values are 0 for off, 1
1832 for on, 2 for hold.<br>
1833 Syntax: <font face="Courier New, Courier, mono" size="2">FireService2 =
1836 <p align="left"><strong>61. MusicOn</strong> - Enables or disables music on
1837 start. Default is true.<br>
1838 Syntax: <font face="Courier New, Courier, mono" size="2">MusicOn =
1841 <p align="left"><strong>62. MusicOnMove</strong> - Determines if music should
1842 only be played while elevator is moving or not. Default is false.<br>
1843 Syntax: <font face="Courier New, Courier, mono" size="2">MusicOnMove =
1846 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>63.
1847 AutoEnable</strong> - Determines if interior objects should automatically be
1848 enabled or disabled when the user enters/exits the elevator (set to false for
1849 glass elevators).<br>
1850 Syntax: <font face="Courier New, Courier, mono" size="2">AutoEnable =
1853 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>64.
1854 ReOpen</strong> - if this is set to true, if the elevator is idle, the doors
1855 will reopen if the same floor is selected. The default is true.<br>
1856 Syntax: <font face="Courier New, Courier, mono" size="2">ReOpen =
1859 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>65.
1860 AutoDoors</strong> - if this is set to true, the elevator doors will
1861 automatically open if instructed (for example, when arriving at a floor), and
1862 will refuse to open if between floors. Set to false for manual elevators. The
1863 default is true.<br>
1864 Syntax: <font face="Courier New, Courier, mono" size="2">AutoDoors =
1867 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>66.
1868 OpenOnStart</strong> - if this is set to true, the elevator doors will
1869 automatically open on startup. The default is false.<br>
1870 Syntax: <font face="Courier New, Courier, mono" size="2">OpenOnStart =
1873 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>67.
1874 Interlocks</strong> - if this is set to true, the elevator doors will remain
1875 locked while the elevator is moving, will refuse to open unless the elevator is
1876 within a landing zone, and the elevator will not move unless the doors are
1877 closed. The default is true.<br>
1878 Syntax: <font face="Courier New, Courier, mono" size="2">Interlocks =
1881 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>68.
1882 FloorHold</strong> - if this is set to true, the user must hold down the floor
1883 button in order to move to the desired floor. When the button is released, the
1884 elevator will immediately stop. This is used to mimic a modern manual elevator
1885 (platform lift). The default is false.<br>
1886 Syntax: <font face="Courier New, Courier, mono" size="2">FloorHold =
1889 <p align="left"><strong>69. DoorSensor</strong> - enable or disable the door
1890 sensor (electric eye), which is a trigger object placed in the elevator door
1891 area. Default is enabled for automatic doors. A second parameter specifies the
1892 sound file to play when switching between on and off - this is normally used
1893 for a relay switch sound effect. Only specify the first parameter for no sound.
1894 This must be specified after the CreateElevator command.<br>
1895 Syntax: <font face="Courier New, Courier, mono" size="2">DoorSensor
1896 <em>doornumber</em> = <em>enable[, filename]</em></font><br>
1897 Example: <font face="Courier New, Courier, mono" size="2">DoorSensor 1 = true,
1898 click.wav</font><br>
1900 To have the sensor play a continuous beep while it's on (obstructed), create a
1901 sound inside the elevator with the AddSound command using the filename of the
1902 beep sound you want, and then create an action with the elevator's "sensor"
1903 command name. So for elevator 1, you would create an action named "Elevator
1904 1:sensor", and the action would do a "playsound" command on the sound you
1910 <p align="left"><strong>Commands:</strong></p>
1912 <p align="left"><strong>1. CreateElevator</strong> - creates an elevator at the
1913 specified location<br>
1914 Syntax: <font face="Courier New, Courier, mono" size="2">CreateElevator
1915 <em>relative, x</em>, <em>z</em>, <em>floor<br>
1916 </em></font>Example:<font face="Courier New, Courier, mono" size="2"><em></em>
1917 CreateElevator false, 0, 10, 0</font></p>
1919 <p align="left"><em>Relative </em>determines if the coordinates are relative to
1920 the shaft center, or if they're absolute, <em>X</em> and <em>Z </em>are the
1921 coordinates to place the center of the elevator at, and <em>Floor</em> is the
1922 floor to place the elevator on.</p>
1924 <p align="left"><strong>2. AddFloor</strong> - adds a textured floor with the
1925 specified dimensions for the elevator<br>
1926 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloor <em>name,
1927 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
1928 <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis, texture_direction,
1929 tw</em>, <em>th</em></font><br>
1930 Example: <font face="Courier New, Courier, mono" size="2">AddFloor Floor1,
1931 Wood2, 0.5, -3.5, -3, 3.5, 3, 0, 0, false, false, 0, 0</font></p>
1933 <p align="left"><strong>3. AddWall</strong> - adds a textured wall for the
1935 Syntax: <font face="Courier New, Courier, mono" size="2">AddWall <em>name,
1936 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>, z2,
1937 <em>height1</em>, <em>height2</em>, <em>voffset1</em>, <em>voffset2,
1938 </em><em>tw</em>, <em>th</em></font><br>
1939 Example: <font face="Courier New, Courier, mono" size="2">AddWall Wall1, Wood1,
1940 0.5, -3.5, 3, 3.5, 3, 8, 8, 0, 0, 2, 2</font></p>
1942 <p align="left">The elevator's AddWall command is similar to the other AddWall
1945 <p align="left"><strong>4. AddDoors</strong> - creates elevator doors<br>
1946 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoors <em>number,
1947 lefttexture, righttexture</em>, <em>thickness, CenterX, CenterZ, width, height,
1948 direction, tw, th</em></font></p>
1950 <p align="left">The AddDoors command creates working elevator doors at the
1951 central location specified by <em>CenterX</em> and <em>CenterZ</em>, with
1952 <em>width</em> and <em>height</em> specifiying the width and height of each
1953 door, and <em>Direction</em> specifying the direction that the doors face
1954 (currently there are only 2: <em>false</em> if the doors are on the left or
1955 right sides, and <em>true</em> if the doors are on the front or back sides).
1956 <em>Number</em> specifies the number of the door to create (related to the
1957 <em>Doors</em> command) - if the elevator only has one door, or if the Doors
1958 command was not used, specify 1 here.</p>
1960 <p align="left"><strong>5. AddShaftDoors</strong> - creates shaft elevator
1962 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoors
1963 <em>number, lefttexture, righttexture</em>, <em>thickness, CenterX, CenterZ,
1964 voffset, tw, th</em></font></p>
1966 <p align="left">The AddShaftDoors command creates working shaft elevator doors
1967 at the central location specified by <em>CenterX</em> and <em>CenterZ</em>.
1968 Other parameters such as width, height, and direction are taken from the
1969 AddDoors command (so the regular elevator doors need to be created first). The
1970 <em>voffset</em> parameter allows you to create shaft doors at a different
1971 vertical position than the base of the floor, and the elevator will
1972 automatically stop according to the shaft door's voffset for that floor. These
1973 doors should be moved slightly away from the elevator doors (to separate them
1974 both). Also, this command creates doors at all the floors specified in the
1975 ServicedFloors value, and cuts any shaft walls that are within the door area
1976 (and so this must be called after the shaft walls are created). <em>Number</em>
1977 specifies the number of the door to create (related to the <em>Doors</em>
1978 command) - if the elevator only has one door, or if the Doors command was not
1979 used, specify 1 here. Note that for filler walls to be created automatically,
1980 the names of the surrounding walls (shaft and outer floor walls) must contain
1981 the word "Shaft".</p>
1983 <p align="left"><strong>6. CreatePanel</strong> - creates a button panel<br>
1984 Syntax: <font face="Courier New, Courier, mono" size="2">CreatePanel
1985 <em>texturename</em>, <em>rows, columns, direction, CenterX, CenterZ,
1986 buttonwidth, buttonheight, spacingX, spacingY, voffset, tw, th<br>
1987 </em></font> Example<font face="Courier New, Courier, mono" size="2"><em>:
1988 </em><font face="Courier New, Courier, mono" size="2">CreatePanel Wall1, 5, 5,
1989 right, -3, -3, 0.15, 0.15, 0.3, 0.45, 4.5, 0, 0</font></font></p>
1991 <p align="left">The CreatePanel command creates a button panel at a position
1992 relative to the elevator's center position (origin). <em>Rows</em> and
1993 <em>Columns</em> define the grid size of the panel. <em>Direction</em> is
1994 either "front", "back", "left" or "right", defining which direction the panel
1995 faces. <em>SpacingX</em> is the space (percent of a button's width)
1996 horizontally between each button, and <em>spacingY</em> is the space (percent
1997 of a button's height) vertically between each button. Not all positions need to
1998 be used; this is simply to provide a grid layout for the panel. This command
1999 also determines the width and height of the panel based on the spacing and
2000 button sizes. A simple formula for determining panel width or height is this -
2001 for width, it's (columns * buttonwidth) + (spacingX * (columns + 1)); for
2002 height, just swap columns with rows and spacingX with spacingY.</p>
2004 <p align="left"><strong>7. AddButton</strong> - creates a standard button on
2006 Syntax: <font face="Courier New, Courier, mono" size="2">AddButton
2007 <em>panel_number, sound, texture_unlit</em>, <em>texture_lit, row, column,
2008 floor/type, width, height[, hoffset, voffset]</em></font><br>
2009 Example 1: <font face="Courier New, Courier, mono" size="2">AddButton 1,
2010 switch.wav, Button5, ButtonLit5, 7, 3, 4, 1, 1</font><br>
2011 Example 2: <font face="Courier New, Courier, mono" size="2">AddButton 1, ,
2012 Button5, ButtonLit5, 7, 3, 4, 1, 1, 0.1, -0.1</font></p>
2014 <p align="left">The AddButton command creates a button on the button panel
2015 created with CreatePanel. <em>Panel_number</em> specifies the number of the
2016 panel to add the button to. <em>Row</em> and <em>Column</em> specify the
2017 position on the grid where the button should be. <em>Floor/Type</em> specifies
2018 either the floor number that this button calls, or the action name such as
2019 "Open" (see the AddControl command for more info). <em>Width</em> and
2020 <em>Height</em> specify the width and height of the button, as a percentage of
2021 a single grid unit size (1 being 100%, 0.5 being 50%). If both values are 0,
2022 the default of 1 is used for both values. If only one of the values is 0, then
2023 the exact size other is used; for example, if <em>width</em> is 0 and
2024 <em>height</em> is 1 (or any other number), then the width will end up being
2025 the same size as the height. <em>Hoffset</em> and <em>Voffset</em> are optional
2026 parameters, and are used to position the button outside the normal grid, and
2027 are in grid units (buttonwidth and buttonheight parameters of the CreatePanel
2028 function). In the second example, the button is positioned 0.1 grid units to
2029 the right, and 0.1 grid units down. Notice that no sound is specified in the
2030 2nd example - this means that a sound won't be played.</p>
2032 <p align="left"><strong>8. AddControl</strong> - advanced command for creating
2033 buttons, switches and knobs on the panel<br>
2034 Syntax: <font face="Courier New, Courier, mono" size="2">AddControl
2035 <em>panel_number, sound, row, column, width, height, hoffset, voffset,
2036 command_name(s), texture_name(s)<br>
2037 </em></font>Example 1: <font face="Courier New, Courier, mono"
2038 size="2">AddControl 1, switch.wav, 7, 3, 1, 1, 0, 0, open, ButtonOpen</font><br>
2039 Example 2: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2040 switch.wav, 7, 3, 1, 1, 0, 0, FanOff, FanOn, SwitchFanOff,
2041 SwitchFanOn</font><br>
2042 Example 3: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2043 switch.wav, 7, 3, 1, 1, 0, 0, Off, 4, Button5, ButtonLit5</font><br>
2044 Example 4: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2045 switch.wav, 7, 3, 1, 1, 0, 0, Fire2Off, Fire2On, Fire2Hold, FireKnob1,
2046 FireKnob2, FireKnob3</font></p>
2048 <p align="left">The AddControl command creates an advanced control on the
2049 specified button panel (created with CreatePanel). Most of the parameters are
2050 the same as the AddButton command, but the <em>command_name(s)</em> and
2051 <em>texture_name(s)</em> parameters allow you to specify a list of commands,
2052 and a list of textures to go along with those commands. A texture needs to be
2053 specified for every command; if you specify 3 commands and only 2 textures, you
2054 will get an error. The first example shows a door open button being created,
2055 with the command "open" and the texture "ButtonOpen". The 2nd example shows a
2056 fan switch being created, with the first command being "FanOff" with the
2057 "SwitchFanOff" texture being used for that, and "FanOn" for the second command
2058 with the "SwitchFanOn" texture being used for that. Example 3 shows a standard
2059 floor button being created (which is what the AddButton command does) and
2060 example 4 shows a fire service mode knob being created with 3 positions. Leave
2061 the sound field blank for no sound to be played.</p>
2063 <p align="left">Available command names for elevators:</p>
2065 <p align="left"><em>Off</em> (no action)<br>
2067 <em>Open</em> (open doors)<br>
2068 <em>Close</em> (close doors)<br>
2069 <em>OpenInt</em> (open interior/car doors)<br>
2070 <em>CloseInt</em> (close interior/car doors)<br>
2071 <em>OpenExt</em> (open exterior/shaft doors)<br>
2072 <em>CloseExt</em> (close exterior/shaft doors)<br>
2073 <em>OpenManual</em> (open doors manually)<br>
2074 <em>CloseManual</em> (close doors manually)<br>
2075 <em>OpenIntManual</em> (open interior/car doors manually)<br>
2076 <em>CloseIntManual</em> (close interior/car doors manually)<br>
2077 <em>Cancel</em> (call cancel)<br>
2078 <em>Run</em> (put elevator in run state)<br>
2079 <em>Stop</em> (put elevator in stop state)<br>
2080 <em>EStop</em> (emergency stop)<br>
2082 <em>Fire1Off</em> (fire service phase 1 off for all elevators in same bank,
2083 which means all served by first call button on recall floor)<br>
2084 <em>Fire1On</em> (fire service phase 1 on for all elevators in same bank)<br>
2085 <em>Fire1Bypass</em> (fire service phase 1 bypass for all elevators in same
2087 <em>Fire2Off</em> (fire service phase 2 off)<br>
2088 <em>Fire2On</em> (fire service phase 2 on)<br>
2089 <em>Fire2Hold</em> (fire service phase 2 hold)<br>
2090 <em>UpPeakOn</em> (enable up peak)<br>
2091 <em>UpPeakOff</em> (disable up peak)<br>
2092 <em>DownPeakOn</em> (enable down peak)<br>
2093 <em>DownPeakOff</em> (disable down peak)<br>
2094 <em>IndOn</em> (enable independent service mode)<br>
2095 <em>IndOff</em> (disable independent service)<br>
2096 <em>InsOn</em> (enable inspection service mode)<br>
2097 <em>InsOff</em> (disable inspection service)<br>
2098 <em>AcpOn</em> (enable ACP mode)<br>
2099 <em>AcpOff</em> (disable ACP mode)<br>
2100 <em>FanOn</em> (enable fan/idle sound)<br>
2101 <em>FanOff</em> (disable fan/idle sound)<br>
2102 <em>Hold</em> (hold door)<br>
2103 <em>MusicOn</em><br>
2104 <em>MusicOff</em><br>
2105 <em>UpOn</em> (inspection mode up on)<br>
2106 <em>UpOff</em> (inspection mode up off)<br>
2107 <em>DownOn</em> (inspection mode down on)<br>
2108 <em>DownOff</em> (inspection mode down off)<br>
2109 <em>GoOn</em> (inspection mode go on)<br>
2110 <em>GoOff</em> (inspection mode go off)<br>
2111 <em>Return</em> (return to nearest serviced floor after stop)<br>
2112 <em>Up</em> (move up for manual elevator)<br>
2113 <em>Down</em> (move down for manual elevator)<br>
2114 <em>InterlocksOn</em> (enable interlocks)<br>
2115 <em>InterlocksOff</em> (disable interlocks)<br>
2116 <em>Sensor</em> (open and hold doors, used by door sensor)<br>
2117 <em>Reset</em> (reset door timer which turns off hold, also used by door
2120 <p align="left">In the above list, <em>Open</em>, <em>Close</em>, related
2121 commands such as <em>OpenInt</em> and <em>OpenManual</em>, <em>Hold</em>,
2122 <em>Sensor</em>, and <em>Reset</em> can have the door number after the name -
2123 for example, <em>Open2</em> will open door 2, while <em>Open</em> will open all
2126 When this command is used, actions are created using the specified commands.
2127 The resulting names of the actions are the elevator name, followed by a colon
2128 and the command name, in order to be unique to each elevator. So the "Open"
2129 command for Elevator 1 is created as an action named "Elevator 1:open", and you
2130 can specify more actions with that name to run multiple actions when the
2131 elevator opens it's doors.<br>
2133 <strong>9. AddFloorIndicator</strong> - creates a floor indicator<br>
2134 Syntax: <font face="Courier New, Courier, mono"
2135 size="2">AddFloorIndicator<em> texture_prefix, direction, CenterX, CenterZ,
2136 width, height, voffset</em></font> </p>
2138 <p align="left">The AddFloorIndicator command creates a floor indicator at the
2139 position (relative to the elevator) specified by <em>CenterX</em> and
2140 <em>CenterZ</em>. <em>Direction</em> is the direction the indicator faces, and
2141 can be either "left", "right", "front" or "back". This command can be given
2142 multiple times to create multiple indicators. <em>Texture_prefix</em> is the
2143 base name of the texture to load when displaying a floor ID; for example if the
2144 elevator is on floor 3, and you specify a prefix of "Button", it'll load the
2145 "Button3" texture.</p>
2147 <p align="left"><strong>10. AddDirectionalIndicator</strong> - creates an
2148 internal directional indicator/lantern<br>
2149 Syntax: <font face="Courier New, Courier, mono"
2150 size="2">AddDirectionalIndicator<em> ActiveDirection, Single, Vertical,
2151 BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit, DownTexture,
2152 DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight,
2153 ShowBack, tw, th<br>
2154 </em></font>Example: <font face="Courier New, Courier, mono"
2155 size="2"><em>AddDirectionalIndicator false, false, true, Metal, UpLight,
2156 UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true, 0,
2159 <p align="left">This command will create a directional indicator inside the
2160 elevator, and the positioning is relative of the elevator's center.</p>
2162 <p align="left"><em>ActiveDirection</em> determines if the indicator should
2163 continuously display the active elevator direction (true), or if it should show
2164 the elevator's direction for the current call (false, default)</p>
2166 <p align="left"><em>Single</em> determines if a single indicator light should
2167 be created instead of two. If this is true, the unlit texture is specified in
2168 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
2170 <p align="left"><em>Vertical</em> determines if the two lights should be
2171 vertically separated (true), or horizontally separated (false)</p>
2173 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
2176 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
2177 used for the lights themselves, and the "Lit" texures are the ones to show when
2178 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
2180 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
2181 of the indicators</p>
2183 <p align="left"><em>voffset</em> is the altitude offset that the object is
2184 above each floor</p>
2186 <p align="left"><em>direction </em>determines the direction the indicators
2188 'front' means they face towards the front of the building<br>
2189 'back' means they face towards the back of the building<br>
2190 'left' means they face left<br>
2191 'right' means they face right</p>
2193 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
2194 height of the wall plate</p>
2196 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
2197 and is either true or false</p>
2199 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
2202 <p align="left"><strong></strong><strong>11. AddDirectionalIndicators</strong>
2203 - creates the elevator's exterior directional indicator/lanterns (similar to
2204 the CreateCallButtons command) <br>
2205 Syntax: <font face="Courier New, Courier, mono"
2206 size="2">AddDirectionalIndicators<em> Relative, ActiveDirection, Single,
2207 Vertical, BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit, DownTexture,
2208 DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight,
2209 ShowBack, tw, th<br>
2210 </em></font>Example:<font face="Courier New, Courier, mono"
2211 size="2"><em> AddDirectionalIndicators true, false, false, true, Metal,
2212 UpLight, UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true,
2213 0, 0</em></font></p>
2215 <p align="left">This command will create directional indicators on all floors
2216 the elevator serves. It'll also automatically create the up and down lights
2217 depending on the floor. To create indicators on a per-floor basis, use the
2218 AddDirectionalIndicator command in the Floor section.</p>
2220 <p align="left"><em>Relative</em> determines if the X and Z coordinates are
2221 relative to the elevator's origin (center) or not.</p>
2223 <p align="left"><em>ActiveDirection</em> determines if the indicator should
2224 continuously display the active elevator direction (true), or if it should show
2225 the elevator's direction for the current call (false, default)</p>
2227 <p align="left"><em>Single</em> determines if a single indicator light should
2228 be created instead of two. If this is true, the unlit texture is specified in
2229 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
2231 <p align="left"><em>Vertical</em> determines if the two lights should be
2232 vertically separated (true), or horizontally separated (false)</p>
2234 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
2237 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
2238 used for the lights themselves, and the "Lit" texures are the ones to show when
2239 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
2241 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
2242 of the indicators</p>
2244 <p align="left"><em>voffset</em> is the altitude offset that the object is
2245 above each floor</p>
2247 <p align="left"><em>direction </em>determines the direction the indicators
2249 'front' means they face towards the front of the building<br>
2250 'back' means they face towards the back of the building<br>
2251 'left' means they face left<br>
2252 'right' means they face right</p>
2254 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
2255 height of the wall plate</p>
2257 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
2258 and is either true or false</p>
2260 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
2263 <p align="left"><strong>12. SetShaftDoors</strong> - (deprecated) sets
2264 positioning and thickness of shaft doors which will be created with the
2265 <em>older AddShaftDoor</em> command. Please use the newer AddShaftDoor syntax
2267 Syntax: <font face="Courier New, Courier, mono"
2268 size="2">SetShaftDoors<em> number</em>, <em>thickness, CenterX,
2269 CenterZ</em></font> </p>
2271 <p align="left">This command must be used before calling <em>the older
2272 AddShaftDoor</em> command. This specifies the thickness and X/Z positioning for
2273 the shaft doors that will be created. <em>Number</em> specifies the door number
2274 this is associated with (use 1 if only one door).</p>
2276 <p align="left"><strong>13. AddFloorSigns</strong> - creates floor signs on all
2277 floors serviced by the elevator<br>
2278 Syntax: <font face="Courier New, Courier, mono"
2279 size="2">AddFloorSigns<em> door_number, relative, texture_prefix, direction,
2280 CenterX, CenterZ, width, height, voffset</em></font> </p>
2282 <p align="left">The AddFloorSigns command creates floor signs (similar to floor
2283 indicators) on all the floors serviced by the current elevator.
2284 <em>Direction</em> is the direction the signs face, and can be either "left",
2285 "right", "front" or "back". <em>Texture_prefix</em> is the base name of the
2286 texture to load when displaying a floor ID; for example if the sign is on floor
2287 3, and you specify a prefix of "Button", it'll load the "Button3" texture.
2288 <em>Door_number</em> specifies the door number to check against, meaning if
2289 shaft doors don't exist on a certain floor for the specified door, the sign
2290 won't be created on that floor. This can be bypassed by setting
2291 <em>door_number</em> to 0.</p>
2293 <p align="left"><strong>14. AddSound</strong> - creates a user-defined sound at
2294 the specified position<br>
2295 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
2296 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
2297 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
2298 direction_x, direction_y, direction_z]</em></font><br>
2299 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
2300 sound.wav, 10, 100, 5, true<br>
2301 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
2302 MySound, ambient.ogg, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
2305 <p align="left">For information on the parameters, see the AddSound command in
2306 the Globals section. The only difference here is that the X, Y and Z position
2307 values are relative of the elevator's center/origin. <em>Loop</em> specifies if
2308 the sound should loop and play on startup.</p>
2310 <p align="left"><strong>15. AddDoorComponent</strong> - creates a single
2311 elevator door component, used for creating custom door styles<br>
2312 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoorComponent
2313 <em>number, name, texture, sidetexture, thickness, direction, openspeed,
2314 closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
2315 side_th</em></font></p>
2317 <p align="left">Example: <font face="Courier New, Courier, mono"
2318 size="2">AddDoorComponent 1, Left, ElevDoors, Black, 0.2, left, 0.3, 0.3,
2319 -1.75, 0, 0, 0, 8, 0, 0, 0, 0, 0</font></p>
2321 <p align="left">The AddDoorComponent command allows you to create your own
2322 custom door styles. It creates a single door component within a set - for
2323 example, the standard center-open doors have 2 door components: left and right.
2324 With this command you specify the positioning of a component similar to wall
2325 creation, specify it's textures, tell it which direction it's going to travel
2326 during opening, and what it's speed will be. <em>Number</em> specifies the
2327 number of the door to create (related to the <em>Doors</em> command) - if the
2328 elevator only has one door, or if the Doors command was not used, specify 1
2329 here. <em>Texture</em> refers to the texture used on the main (front and back)
2330 sides of the door. <em>SideTexture</em> refers to the texture used on the sides
2331 (and top/bottom) of the door. <em>Direction</em> is either Up, Down, Left (or
2332 Front; is the same), or Right (or Back; is also the same). <em>Side_tw</em> and
2333 <em>side_th</em> specify the texture tiling for the sides. Use the FinishDoors
2334 command after creating the components. The above example creates the left door
2335 component for the standard center-open doors, and uses default speed values.
2336 This command replaces the AddDoors command.</p>
2338 <p align="left"><strong>16. AddShaftDoorsComponent</strong> - creates a single
2339 shaft door component for all serviced floors - used for creating custom door
2341 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoorsComponent
2342 <em>number, name, texture, sidetexture, thickness, direction, openspeed,
2343 closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
2344 side_th</em></font></p>
2346 <p align="left">This command is almost identical to the AddDoorComponent
2347 command, except that it creates shaft doors. Use the FinishShaftDoors command
2348 after creating the components. This command replaces the AddShaftDoors command.
2349 To create shaft doors on a per-floor basis, use the AddShaftDoorComponent
2350 command in the Floors section.</p>
2352 <p align="left"><strong>17. FinishDoors</strong> - finishes elevator door
2353 creation - use this after all related AddDoorComponent commands are used.<br>
2354 Syntax: <font face="Courier New, Courier, mono" size="2">FinishDoors
2355 <em>number[, create_walls]</em></font></p>
2357 <p align="left">This command completes the elevator door creation by storing
2358 the central location and shift factor, cutting walls for the door, creating
2359 side connection pieces for the cut, etc. The optional <em>create_walls</em>
2360 option specifies if the command should create the side and top/bottom
2361 connection/filler walls.</p>
2363 <p align="left"><strong>18. FinishShaftDoors</strong> - finishes shaft door
2364 creation for all serviced floors - use this after all related
2365 AddShaftDoorsComponent commands are used, or specify it without the
2366 AddShaftDoorComponent commands if you're creating a manual shaft door.<br>
2367 Syntax: <font face="Courier New, Courier, mono" size="2">FinishShaftDoors
2368 <em>number[, create_walls]</em></font></p>
2370 <p align="left">This command is almost identical to the FinishDoors command
2371 except that it's used for finishing shaft doors on all serviced floors. Note
2372 that for filler walls to be created automatically, the names of the surrounding
2373 walls (shaft and outer floor walls) must contain the word "Shaft".</p>
2375 <p align="left"><strong>19. AddDoor</strong> - adds a textured door in the
2376 specified location, which moves with the elevator<br>
2377 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoor <em>opensound,
2378 closesound, texturename, open, thickness</em>, <em>direction, speed,
2379 CenterX</em>, <em>CenterZ</em>, <em>width</em>, <em>height</em>,
2380 <em>voffset</em>, <em>tw</em>, <em>th</em></font></p>
2382 <p align="left">See the AddDoor command in the floor section for information on
2383 the parameters. <em>CenterX</em> and <em>CenterZ</em> are relative of the
2384 elevator's center.</p>
2386 <p align="left"><strong>20. AddModel</strong> - adds a 3D model to the floor.
2387 The model's textures/materials must be defined in a separate ".material" file,
2388 and a separate collider mesh ".collider" will be loaded. If a collider mesh
2389 isn't available, a simple box collider will be created.<br>
2390 Syntax: <font face="Courier New, Courier, mono" size="2">AddModel<em> name,
2391 filename, center, CenterX, CenterY, CenterZ, RotationX, RotationY, RotationZ,
2392 MaxRenderDistance, ScaleMultiplier, EnablePhysics, Restitution, Friction,
2394 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
2395 MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font></p>
2397 <p align="left">The <em>Center</em> value is either true or false, and
2398 determines if the loaded model should be automatically centered, otherwise the
2399 exact mesh positioning in the model file will be used. The <em>CenterY</em>
2400 value is relative to the current floor's base. <em>MaxRenderDistance</em>
2401 determines the maximum distance in feet that the object will be shown (0 means
2402 unlimited). <em>ScaleMultiplier</em> allows you to change the size of the
2403 object during the load - for example, set to 2 to double the size. Models are
2404 in the OGRE native mesh format. In the example, the material/texture file is
2405 cube.material, and the optional collider mesh file is cube.collider.
2406 <em>EnablePhysics</em> enables Bullet physics on the object, and
2407 <em>Restitution</em>, <em>Friction</em> and <em>Mass</em> determine the
2408 physical properties of the object.</p>
2410 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>21.
2411 AddActionControl</strong> - creates a custom control that uses a specific
2412 action defined by AddAction.<br>
2413 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
2414 <em>name, sound, direction, centerx, centerz, width, height, voffset,
2415 action_name(s), texture_name(s)<br>
2416 </em></font>Example: <font face="Courier New, Courier, mono"
2417 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
2418 UndoMyAction, MyAction, Touch, TouchLit<br>
2420 AddActionControl command creates an advanced control similar to elevator button
2421 panel controls, but assigned to an action created with the AddAction command.
2422 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
2423 to specify a list of actions, and a list of textures to go along with those
2424 actions. There needs to be a texture for every action; if you specify 3 actions
2425 and only 2 textures, you will get an error. The control starts up in the first
2426 action, and switches to the next actions in sequence when it's clicked.
2427 <em>Direction</em> is the direction the control itself will face in 3D space
2428 (front, left, right, back). <em>Voffset</em> is relative of the elevator's
2429 base. Leave the sound field blank for no sound to be
2430 played.<strong></strong></p>
2432 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>22.
2433 AddTrigger</strong> - creates a trigger that is used to signal an action when
2434 the user's camera enters or leaves the defined area.<br>
2435 Syntax:<font face="Courier New, Courier, mono" size="2"> AddTrigger <em>name,
2436 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
2437 </em></font>Example:<font face="Courier New, Courier, mono"
2438 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
2439 UndoMyAction, MyAction</font><br>
2441 AddTrigger creates a trigger similar to action controls (AddActionControl) and
2442 elevator controls. The <em>action_names(s)</em> parameter allows you to specify
2443 a list of actions that this trigger will call when the camera enters or exits
2444 the area. The trigger starts in the first action, and will switch to each
2445 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
2446 <em>Z</em> parameters specify the 3D box that defines the trigger area, and are
2447 relative of the elevator's location. Leave the <em>sound</em> field blank for
2448 no sound to be played.</p>
2450 <p align="left"> </p>
2452 <p align="left"><strong><font size="+1"><a name="GlobalCommands"
2453 id="GlobalCommands"></a>8. Global Commands/Functions</font></strong></p>
2455 <p align="left">These commands and functions can be used anywhere in the
2456 script. In this section, <em>Destobject</em> refers to the destination object
2457 to create other objects in. It can be either <em>floor </em>(only available
2458 within a Floor section)<em>, elevator </em>(only available within an Elevator
2459 section), <em>external</em>, <em>landscape</em>, or <em>buildings</em> (more
2460 will come soon). When the command is used inside a <em>Floor</em> section, and
2461 <em>Destobject</em> is not <em>floor</em>, the altitude of the current floor
2462 will be used, and altitude/y values specified in these commands will be offsets
2463 of that altitude.</p>
2465 <p align="left"><br>
2466 <strong>a. AddTriangleWall</strong> - adds a textured triangular wall. If
2467 specified in a floor section, the Y values are then relative to the floor
2469 Syntax: <font face="Courier New, Courier, mono" size="2">AddTriangleWall
2470 <em>destobject, name, texturename</em>, <em>x1</em>, <em>y1</em>, <em>z1</em>,
2471 <em>x2</em>, <em>y2</em>, <em>z2</em>, <em>x3</em>, <em>y3</em>, <em>z3</em>,
2472 <em>tw</em>, <em>th</em></font><br>
2473 Example: <font face="Courier New, Courier, mono" size="2">AddTrianglewall
2474 external, My Triangle, brick, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0</font></p>
2476 <p align="left"><strong>b. AddWall</strong> - adds a textured wall<br>
2477 Syntax: <font face="Courier New, Courier, mono" size="2">AddWall
2478 <em>destobject, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
2479 <em>x2</em>, z2, <em>height1</em>, <em>height2</em>, <em>altitude1</em>,
2480 <em>altitude2</em>, <em>tw</em>, <em>th</em></font><br>
2481 Example: <font face="Courier New, Courier, mono" size="2">AddWall buildings,
2482 Wall1, brick, 0.5, -10, -10, 10, 10, 15, 15, Floor(2).Altitude,
2483 Floor(2).Altitude, 0, 0</font></p>
2485 <p align="left">The command's parameters are the same as the Floor section's
2486 AddWall command.</p>
2488 <p align="left"><strong>c. AddFloor</strong> - adds a textured floor<br>
2489 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloor
2490 <em>destobject, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
2491 <em>x2</em>, <em>z2</em>, <em>altitude1</em>, <em>altitude2</em>, reverse_axis,
2492 texture_direction, <em>tw</em>, <em>th</em></font></p>
2494 <p align="left">The command's parameters are the same as the Floor section's
2495 AddFloor command.</p>
2497 <p align="left"><strong>d. AddGround</strong> - adds a tile-based ground<br>
2498 Syntax: <font face="Courier New, Courier, mono" size="2">AddGround <em>name,
2499 texturename</em>, <em>x1</em>, <em>z1</em>, <em>x2</em>, <em>z2</em>,
2500 <em>altitude</em>, <em>tile_x</em>, <em>tile_y<br>
2501 </em></font>Example: <font face="Courier New, Courier, mono" size="2">AddGround
2502 AddGround Ground, Downtown, -158400, -158400, 158400, 158400, 0, 7920,
2505 <p align="left">This command is mainly for creating large ground sections,
2506 since using the AddFloor function with a large amount of texture tiling causes
2507 interference problems. The <em>X</em> and <em>Z</em> values specify the total
2508 size of the ground, and the <em>tile_x</em> and <em>tile_y</em> specify the
2509 size of each tile square to create. For example, if the ground is 10,000 feet
2510 wide, and tile_x and tile_y are both 1000, then 100 total tiles will be
2511 created; 10 wide and 10 deep. In the example above 7920 is 1/40 of the total
2512 width (316800 which is 158400 * 2), so the tile grid will be 40x40 tiles.</p>
2514 <p align="left"><strong>e. CreateWallBox</strong> - creates 4 walls (box) at
2515 the specified coordinate locations<br>
2516 Syntax: <font face="Courier New, Courier, mono" size="2">CreateWallBox
2517 <em>destobject</em>, <em>name, texturename</em>, <em>x1</em>, <em>x2</em>,
2518 <em>z1</em>, <em>z2</em>, <em>height</em>, <em>voffset</em>, <em>tw</em>,
2519 <em>th, inside, outside, top, bottom </em></font><br>
2520 Example: <font face="Courier New, Courier, mono" size="2">CreateWallBox
2521 external, My Box, brick, -10, 10, -10, 10, 15, 0, 0, 0, true, true, true,
2524 <p align="left">The parameters in this command are very similar to the ones in
2525 the AddWall command shown below in the Floor section, except that a box is
2526 created instead of a single wall. <em>Inside</em> and <em>outside</em>
2527 determine if the wall should be visible from the inside/outside, and
2528 <em>top</em> and <em>bottom</em> determine if the top and bottom walls should
2531 <p align="left"><strong>f. CreateWallBox2</strong> - creates 4 walls (box) at a
2532 specified central location<br>
2533 Syntax: <font face="Courier New, Courier, mono" size="2">CreateWallBox2
2534 <em>destobject</em>, <em>name, texturename</em>, <em>centerx</em>,
2535 <em>centerz</em>, <em>widthx</em>, <em>lengthz</em>, <em>height</em>,
2536 <em>voffset</em>, <em>tw</em>, <em>th</em></font><font
2537 face="Courier New, Courier, mono" size="2"><em>, inside, outside, top, bottom
2539 Example: <font face="Courier New, Courier, mono" size="2">CreateWallBox2
2540 external, My Box, brick, 0, 0, 10, 10, 15, 0, 0, 0, false, true, false,
2543 <p align="left">The parameters are the same as the above command, except that
2544 <em>centerx</em> and <em>centerz</em> define the center of the box, and
2545 <em>widthx</em> and <em>lengthz</em> specify the width and length off of the
2548 <strong>g. AddCustomWall</strong> - creates a custom polygon (wall, floor, etc)
2549 with any number of vertex points. For example, a triangular wall has 3 vertex
2550 points, and a standard wall has 4. This function allows at least 3 vertices.<br>
2551 Syntax: <font face="Courier New, Courier, mono" size="2">AddCustomWall
2552 <em>destobject, name, texturename, x1, y1, z1, x2, y2, z2, x3, y3, z3, ..., tw,
2554 Example: <font face="Courier New, Courier, mono" size="2">AddCustomWall
2555 external, My Wall, brick, 0, 0, 0, 0, 10, 0, 10, 10, 0, 10, 0, 10, 0,
2558 <p align="left"><strong>h. AddCustomFloor</strong> - the same as AddCustomWall,
2559 but with only one vertical parameter. If specified while in a floor section,
2560 the altitude is relative to the current floor's base.<br>
2561 Syntax: <font face="Courier New, Courier, mono" size="2">AddCustomFloor
2562 <em>destobject, name, texturename, x1, z1, x2, z2, x3, z3, ..., altitude, tw,
2564 Example: <font face="Courier New, Courier, mono" size="2">AddCustomFloor
2565 external, My Wall, brick, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0</font></p>
2567 <p align="left"><strong>i. AddShaft</strong> - creates a shaft at a specified
2568 location and floor range<br>
2569 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaft <em>number,
2570 centerx, centerz, startfloor, endfloor</em></font><br>
2571 Example: <font face="Courier New, Courier, mono" size="2">AddShaft 1, 10, 10,
2574 <p align="left">The <em>number</em> parameter specifies the shaft number to
2575 create. This command just tells the simulator the area that the shaft will take
2576 up, and does not create the actual shaft walls. Later on when you create the
2577 walls/floors for the shaft, make sure that you make a floor at the very bottom
2578 and very top of the shaft (they can extend beyond the walls).</p>
2580 <p align="left"><strong>j. CreateStairwell</strong> - creates a stairwell at a
2581 specified location and floor range<br>
2582 Syntax: <font face="Courier New, Courier, mono" size="2">CreateStairwell
2583 <em>number, centerx, centerz, startfloor, endfloor</em></font><br>
2584 Example: <font face="Courier New, Courier, mono" size="2">CreateStairwell 1,
2585 10, 10, 0, 9</font></p>
2587 <p align="left">The <em>number</em> parameter specifies the stairwell number to
2588 create. This command just tells the simulator the area that the stairwell will
2589 take up, and does not create the actual walls.</p>
2591 <p align="left"><strong>k. WallOrientation</strong> - changes the internal wall
2592 orientation parameter, which is used for determining the wall thickness
2593 boundaries in relation to their coordinates.<br>
2594 Syntax:<font face="Courier New, Courier, mono" size="2"> WallOrientation =
2595 <em>direction</em></font><br>
2596 Example: <font face="Courier New, Courier, mono" size="2">WallOrientation =
2599 <p align="left">The <em>direction</em> parameter can either be left, center, or
2600 right. Center is default. For example, if center is used, than half of the
2601 wall's thickness is to the right (positive) of it's x1/x2 or z1/z2 coordinates,
2602 and half is to the left (negative) of the coordinates. If left is used, than
2603 the coordinates define the wall's left (negative) edge, and the full thickness
2604 is to the right (positive) of those. If right is used, then again the
2605 coordinates define the wall's right (positive) edge, and the full thickness is
2606 to the left (negative) of those. See this graphic for a good example:</p>
2608 <p align="left"><img src="guide/wall_info.jpg"></p>
2610 <p align="left">In the graphic above, the large box at the top shows what the X
2611 and Z coordinates correspond to. The lower examples show the wall orientation
2612 as left or right, and if either the difference in x values or z values is
2615 <p align="left"><strong>l. FloorOrientation</strong> - changes the internal
2616 floor orientation parameter, which is used for determining the floor thickness
2617 boundaries in relation to their coordinates.<br>
2618 Syntax:<font face="Courier New, Courier, mono" size="2"> FloorOrientation =
2619 <em>direction</em></font><br>
2620 Example: <font face="Courier New, Courier, mono" size="2">FloorOrientation =
2623 <p align="left">The <em>direction</em> parameter can either be bottom, center,
2624 or top. Top is default. For example, if center is used, than half of the
2625 floor's thickness is above (positive) it's x1/x2 or z1/z2 coordinates, and half
2626 is below (negative) the coordinates. If bottom is used, than the coordinates
2627 define the floor's bottom edge, and the full thickness is the top (positive).
2628 If top is used, then again the coordinates define the floor's top edge, and the
2629 full thickness is the bottom (negative).</p>
2631 <p align="left"><strong>m. DrawWalls</strong> - specifies which parts of a wall
2632 or floor should be drawn.<br>
2633 Syntax:<font face="Courier New, Courier, mono" size="2"> DrawWalls =
2634 <em>MainNegative, MainPositive, SideNegative, SidePositive, Top,
2635 Bottom</em></font><br>
2636 Example: <font face="Courier New, Courier, mono" size="2">DrawWalls = true,
2637 true, false, false, false, false</font></p>
2639 <p align="left">The example shown is the default setting. <em>MainNegative</em>
2640 is the main (that makes up the front of a wall lengthwise, or the top area of a
2641 floor) face on the negative side, <em>MainPositive</em> is the main face on the
2642 positive side (back of a wall, or the bottom area of a floor),
2643 <em>SideNegative</em> is the side (the part that is along the thickness) face
2644 on the negative side, <em>SidePositive</em> is the side face on the positive
2645 side; <em>Top</em> refers to either the top side if a wall, or to the front
2646 face if a floor; <em>Bottom</em> refers to either the bottom side if a wall, or
2647 the back face if a floor. The following graphic explains the sides in detail:
2650 <p align="left"><img src="guide/sides.jpg"></p>
2652 <p align="left"><strong>n. SetPlanarMapping</strong> - sets the planar texture
2653 mapper's parameters.<br>
2654 Syntax: <font face="Courier New, Courier, mono" size="2">SetPlanarMapping
2655 <em>Flat, FlipX, FlipY, FlipZ, Rotate</em></font><br>
2656 Example: <font face="Courier New, Courier, mono" size="2">SetPlanarMapping
2657 false, false, false, true, false</font></p>
2659 <p align="left"><em>FlipX</em>, <em>FlipY</em> and <em>FlipZ</em> reverse the
2660 texture mapping per axis, and <em>Flat</em> has it ignore depth., Skyscraper by
2661 default uses a simple planar texture mapper, which in simple terms draws the
2662 texture in a box around the object. With a basic wall, the top-left of the
2663 texture image is mapped to the top left of the wall, the top-right is mapped to
2664 the top-right of the wall, etc. If you want the top-right of the texture mapped
2665 to the top-left of the wall for example (to flip or change alignment), you'd
2666 set <em>FlipX</em> to false. This command is mainly used to change alignment -
2667 since the top-left of the texture is mapped to the top-left of the object, that
2668 means that textures have a left/top alignment by default. If you change
2669 <em>FlipX</em> to true, it'll be right-aligned. If you change <em>FlipY</em> to
2670 true, it'll be bottom-aligned. <em>Rotate</em> has it rotate the texture
2671 mapping 90 degrees counterclockwise, so instead of the texture being mapped
2672 from the top left to bottom right, if <em>Rotate</em> is true, it'll be mapped
2673 from the bottom left to top right. See this picture for an example:</p>
2675 <p align="left"><img src="guide/extents.jpg"></p>
2677 <p align="left">In the above picture, I tiled a texture (a black box with
2678 yellow around it) 2.5 times on width and height. The bottom floor shows the
2679 default texture mapping (ReverseExtents false, false, false, false, false);
2680 you'll notice that it's aligned to the top-left. In the middle one, I set the
2681 <em>FlipX</em> value to true (ReverseExtents false, true, false, false, false).
2682 In the top one, I set the <em>FlipY</em> value to true (ReverseExtents false,
2683 false, true, false, false).</p>
2685 <p align="left"><strong>o. SetTextureMapping</strong> - manually sets UV
2686 texture mapping for all polygons generated after this command;
2687 ResetTextureMapping restores the values to the defaults or previous<br>
2688 Syntax:<font face="Courier New, Courier, mono" size="2"> SetTextureMapping
2689 <em>vertex1, u1, v1, vertex2, u2, v2, vertex3, u3, v3</em></font><br>
2690 Example: <font face="Courier New, Courier, mono" size="2">SetTextureMapping 0,
2691 0, 0, 1, 1, 0, 2, 1, 1</font></p>
2693 <p align="left">The example shown above is the default value used by the
2694 simulator. This command maps the texture coordinates to the specified 3 vertex
2695 indices - normally a side of a wall will have 4 vertices/sets of coordinates (0
2696 to 3), and by default the first three are used (top left, top right and bottom
2697 right respectively), with the UV coordinates representing the size percentage
2698 of the texture (with 1 being 100%, 0.5 being 50%, etc; normally this would
2699 relate to absolute texture coordinates) - so in the example, texture coordinate
2700 0,0 (top left) is mapped at the first vertex (top left); texture coordinate 1,0
2701 (really "width, 0") being mapped at the second vertex (top right), and texture
2702 coordinate 1,1 (really "width, height") being mapped to the bottom right. For a
2703 standard wall, the valid vertex values are from 0 to 3. If a wall or floor is
2704 created with AddCustomWall, and if it has for example 7 vertex points, the
2705 valid values for this command would then be 0 to 6 (but only 3 vertices can be
2706 used for mapping purposes). One caveat with manual texture mapping is that
2707 sometimes the simulator will automatically reverse the vertices to keep the
2708 wall faces oriented properly, so if you set your texture mapping this way and
2709 notice issues, try reversing the coordinates (u3 would be u1 for a 3-point
2710 triangular wall, etc) and see if that helps. Textures can also be cropped with
2711 this command - for example, to map only a central square of a texture, you'd
2713 <font face="Courier New, Courier, mono" size="2">SetTextureMapping 0, 0.25,
2714 0.25, 1, 0.75, 0.25, 2, 0.75, 0.75</font></p>
2716 <p align="left">Here's an easier way to see the example above:</p>
2718 <p align="left"><font face="Courier New, Courier, mono" size="2">0 -> 0,
2721 2 -> 1, 1</font></p>
2723 <p align="left">The following diagram shows the mapping described above.
2724 Texture location 0,0 is mapped to wall vertex 0, location 1,0 is mapped to
2727 <p align="left"><img src="guide/texture_mapping.jpg" width="300"
2730 <p align="left"><strong>p. SetTextureMapping2</strong> - advanced version of
2731 SetTextureMapping - manually sets UV texture mapping for all polygons generated
2732 after this command; ResetTextureMapping restores the values to the defaults or
2734 Syntax:<font face="Courier New, Courier, mono" size="2"> SetTextureMapping2
2735 <em>v1x, v1y, v1z, u1, v1, v2x, v2y, v2z, u2, v2, v3x, v3y, v3z, u3,
2737 Example: <font face="Courier New, Courier, mono" size="2">SetTextureMapping2
2738 x0, y0, z0, 0, 0, x1, y1, z1, 1, 0, x2, y2, z2, 1, 1</font></p>
2740 <p align="left">See the above description of SetTextureMapping for a detailed
2741 description on texture mapping in general. This command mostly does the same as
2742 that command, and the example given is the default command (and is equivalent
2743 to the SetTextureMapping example). Instead of just choosing which vertex
2744 indices to use like SetTextureMapping, this command lets you create your own
2745 texture vertices (sets of coordinates) using coordinates of already-existing
2746 vertices. The vertex values that can be used start with an "x", "y" or "z",
2747 followed by the vertex index. In the example, the X, Y and Z values of the
2748 first vertex are mapped to UV coordinate 0,0 - this is because "x0, y0, z0" was
2749 specified. A specification of "x0, y2, z0" will use the X and Z values from
2750 vertex 0, but the Y value from vertex 2. This way you can specify coordinates
2751 outside of the wall/polygon's range. Here's an easier way to see the
2754 <p align="left"><font face="Courier New, Courier, mono" size="2">x0, y0, z0
2756 x1, y1, z1 -> 1, 0<br>
2757 x2, y2, z2 -> 1, 1</font></p>
2759 <p align="left"><strong>q. ResetTextureMapping</strong> - resets the texture
2760 mapping parameters to either the default or previous values<br>
2761 Syntax:<font face="Courier New, Courier, mono" size="2"> ResetTextureMapping =
2762 <em>default</em></font><br>
2763 Example: <font face="Courier New, Courier, mono" size="2">ResetTextureMapping =
2766 <p align="left">If <em>default</em> is true, the texture mapping values are
2767 reset to the default, which is shown above in the SetTextureMapping's example.
2768 If <em>default</em> is false, the previous values will be loaded and used.</p>
2770 <p align="left"><strong>r. ReverseAxis</strong> - this command is deprecated,
2771 and only used for older versions of the AddFloor commands, since the current
2772 ones have this option built-in. This reverses the axis that the difference in
2773 altitude/voffset for floors corresponds to. In the AddFloor command, there are
2774 parameters for specifying two different altitudes. By default, if the altitudes
2775 are different, the floor will angle upward/downward along the Z axis
2776 (front/back), but if this is set to true, the floor will angle along the X axis
2778 Syntax:<font face="Courier New, Courier, mono" size="2"> ReverseAxis =
2779 <em>value</em></font></p>
2781 <p align="left"><strong>s. ShaftCut</strong> - used in conjunction with a shaft
2782 object - performs a vertical box cut on all floor objects (floors, ceilings,
2783 interfloor, etc) in the specified range.<br>
2784 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftCut <em>number,
2785 startx, startz, endx, endz, start_voffset, end_voffset</em></font><br>
2786 Example: <font face="Courier New, Courier, mono" size="2">ShaftCut 1, -4, -3.5,
2787 4, 3.5, 0, 5</font></p>
2789 <p align="left"><em>Number</em> is the number of the shaft object to work with.
2790 <em>Startx</em>, <em>startz</em>, <em>endx</em>, and <em>endz</em> are two sets
2791 of coordinates that specify the cut box's start position and end position,
2792 relative to the shaft's central position. <em>Start_voffset</em> is the
2793 position above the starting floor's altitude to start the cut at, and
2794 <em>end_voffset</em> is the position above the ending floor's altitude to end
2795 the cut at. The example cuts a box for shaft 1, with a width from -4 to 4, and
2796 a length from -3.5 to 3.5, starting at the starting floor's altitude, and
2797 ending at 5 feet above the ending floor's altitude.</p>
2799 <p align="left"><strong>t. CutStairwell</strong> - used in conjunction with a
2800 stairwell object - performs a vertical box cut on all floor objects (floors,
2801 ceilings, interfloor, etc) in the specified range. For the parameters, see the
2802 ShaftCut command.<strong><br>
2803 </strong>Syntax: <font face="Courier New, Courier, mono" size="2">CutStairwell
2804 <em>number, startx, startz, endx, endz, start_voffset,
2805 end_voffset</em></font><br>
2806 Example: <font face="Courier New, Courier, mono" size="2">CutStairwell 1, -4,
2807 -3.5, 4, 3.5, 0, 5</font></p>
2809 <p align="left"><strong>u. Isect</strong> - the Isect function calculates the
2810 position that a line intersects with a certain object, such as a floor. Since
2811 this is a function, it can be used in-line anywhere.<br>
2812 Syntax:<font face="Courier New, Courier, mono" size="2"> isect(<em>destobject,
2813 objectname, startx, starty, startz, endx, endy, endz</em>)</font><br>
2814 Example: <font face="Courier New, Courier, mono" size="2">isect(external,
2815 wall1, 10, 10, 0, -10, 10, 0)</font></p>
2817 <p align="left"><em>Destobject</em> is the destination object to get the object
2818 from (floor, external, landscape, or buildings). <em>Startx</em>,
2819 <em>starty</em>, and <em>startz</em> make up the position of the starting
2820 position, and <em>endx</em>, <em>endy</em> and <em>endz</em> make up the ending
2821 position. The first intersection of the named object is the return value, in
2822 "X, Y, Z" format (for example, "10, 1, 3").</p>
2824 <p align="left"><strong>v. SetAutoSize</strong> - enables or disables texture
2826 Syntax:<font face="Courier New, Courier, mono" size="2"> SetAutoSize =
2827 <em>AutoWidth, AutoHeight </em></font><br>
2828 Example: <font face="Courier New, Courier, mono" size="2">SetAutoSize = true,
2831 <p align="left">This command will determine if the simulator should
2832 automatically size texture appropriately when applied to an object, such as a
2833 wall or floor. By default, both are enabled. The <em>AutoWidth</em> and
2834 <em>AutoHeight</em> parameters correspond to the "<em>tw</em>" and
2835 "<em>th</em>" parameters of the <em>AddWall</em>, <em>AddFloor</em>, etc
2836 commands. If any are false, then the parameters specified in the
2837 <em>AddWall</em> etc commands multiply the texture values stored with with the
2838 <em>Load</em> or <em>LoadRange</em> commands (see below); those values relate
2839 to the number of times a texture is tiled; so if <em>AutoHeight</em> is set to
2840 False, "2" is specified in the "<em>th</em>" value of <em>AddWall</em>, and the
2841 texture's stored "th" value is 1, then the texture will be tiled twice
2842 vertically. If either are true, the specified value will me multiplied by the
2843 related stored texture value and then autoadjusted.</p>
2845 <p align="left"><strong>w. TextureOverride</strong> - overrides textures for
2846 the next command. Currently only works with the different AddWall, AddFloor and
2847 AddInterFloor commands.<br>
2848 Syntax:<font face="Courier New, Courier, mono" size="2"> TextureOverride
2849 <em>MainNegativeTex, MainPositiveTex, SideNegativeTex, SidePositiveTex, TopTex,
2850 Bottom</em></font><font face="Courier New, Courier, mono"
2851 size="2"><em>Tex</em></font><br>
2852 Example: <font face="Courier New, Courier, mono" size="2">TextureOverride
2853 Metal1, ElevFloor, Metal1, Metal1, Metal1, Metal1</font></p>
2855 <p align="left">This command will allow you to specify multiple textures for a
2856 single command such as AddWall. It will only work on the command immediately
2857 after this one. In the above example, the Main Positive side of the object will
2858 have the texture "ElevFloor", but all other sides will use "Metal1".</p>
2860 <p align="left"><strong>x. ShaftShowFloors</strong> - allows a range of floors
2861 to be shown either while inside the specified shaft or while inside an elevator
2862 in the shaft - primarily for glass elevators.<br>
2863 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftShowFloors
2864 <em>ShaftNumber</em> = <em>range/list</em></font><br>
2865 Example: <font face="Courier New, Courier, mono" size="2">ShaftShowFloors 1 = 1
2868 <p align="left">In the above example, let's say the user is in an elevator in
2869 shaft 1, and is moving upwards from the 2nd floor. In this situation, the 2nd
2870 floor will be visible/enabled while they're in the elevator (since it was in
2871 the range specified with this command), but when they reach the 11th floor,
2872 that floor will be invisible/disabled.</p>
2874 <p align="left"><strong>y. ShaftShowOutside</strong> - allows objects outside
2875 the building (sky, landscape, etc) to be enabled while the user is both inside
2876 the specified shaft and on one of the specified floors - primarily for glass
2878 Syntax:<font face="Courier New, Courier, mono" size="2"> ShowShaftOutside
2879 <em>ShaftNumber</em> = <em>range/list</em></font><br>
2880 Example: <font face="Courier New, Courier, mono" size="2">ShowShaftOutside 1 =
2883 <p align="left">In the above example, if a user is riding an elevator in shaft
2884 1, the outside (sky, landscape, etc) will be enabled while the elevator is on
2885 any of the floors from 1 to 10. Once the elevator reaches the 11th floor, the
2886 outside will be disabled. This command can be mixed with
2887 <em>ShaftShowFloors</em> for mixed atrium/external glass elevators such as the
2888 ones in the Glass Tower, where the elevator moves upwards through an indoor
2889 atrium, and eventually outside above the atrium. In that situation, the floors
2890 that comprise the lower (atrium) section would be specified using
2891 <em>ShaftShowFloors</em> (such as 1-10), while the upper (outdoor) floors would
2892 be specified using <em>ShaftShowOutside</em> (such as 11-20).</p>
2894 <p align="left"><strong>z. ShowFullShaft</strong> - determines if an entire
2895 shaft should always be shown, such as a glass elevator track.<br>
2896 Syntax:<font face="Courier New, Courier, mono" size="2"> ShowFullShaft
2897 <em>ShaftNumber</em> = <em>value</em></font><br>
2898 Example: <font face="Courier New, Courier, mono" size="2">ShowFullShaft 1 =
2901 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aa.
2902 StairsShowFloors</strong> - allows a range of floors to be shown while inside
2903 the specified stairwell.<br>
2904 Syntax:<font face="Courier New, Courier, mono" size="2"> StairsShowFloors
2905 <em>StairwellNumber</em> = <em>range/list</em></font><br>
2906 Example: <font face="Courier New, Courier, mono" size="2">StairsShowFloors 1 =
2908 In the above example, let's say the user is in stairwell 1, and is walking
2909 upwards from the 2nd floor. In this situation, the 2nd floor will be
2910 visible/enabled while they're walking up (since it was in the range specified
2911 with this command), but when they reach the 11th floor, that floor will be
2912 invisible/disabled.</p>
2914 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ab.
2915 ShowFullStairs</strong> - determines if an entire stairwell should be shown
2916 while the user is inside - useful for stairwells that have a gap in the center
2917 between the actual stairs.<br>
2918 Syntax:<font face="Courier New, Courier, mono" size="2"> ShowFullStairs
2919 <em>StairwellNumber</em> = <em>value</em></font><br>
2920 Example: ShowFullStairs 1 = true</p>
2922 <p align="left"><strong>ac. TextureFlip</strong> - flips specified textures for
2923 the next command.. Currently only works with the different AddWall, AddFloor
2924 and AddInterFloor commands. The values available are 0 for no flipping, 1 for
2925 horizontal flip, 2 for vertical flip, and 3 for both horizontal and
2927 Syntax:<font face="Courier New, Courier, mono" size="2"> TextureFlip
2928 <em>MainNegative, MainPositive, SideNegative, SidePositive, Top,
2929 Bottom</em></font><br>
2930 Example: <font face="Courier New, Courier, mono" size="2">TextureFlip 1, 1, 0,
2933 <p align="left">This command will allow you to flip textures on specific parts
2934 of a wall or floor created with a command such as AddWall. It will only work on
2935 the command immediately after this one. In the above example, the Main Positive
2936 and Main Negative sides of the object will have their textures flipped
2939 <p align="left"><strong>ad. Cut</strong> - performs a manual box cut on an
2941 Syntax: <font face="Courier New, Courier, mono" size="2">Cut <em>destobject,
2942 x1, y1, z1, x2, y2, z2, cutwalls, cutfloors</em><br>
2943 </font>Example: <font face="Courier New, Courier, mono" size="2">Cut external,
2944 -5, -5, -5, 5, 5, 5, false, true</font></p>
2946 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
2947 start and end coordinates of the box cut. If <em>cutwalls</em> is true, the
2948 function will cut walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
2950 <p align="left"><strong>ae. Mount</strong> - mounts a zip file in the data
2951 directory into a virtual path.<br>
2952 Syntax: <font face="Courier New, Courier, mono" size="2">Mount
2953 <em>filename</em>, <em>path</em></font><br>
2954 Example: <font face="Courier New, Courier, mono" size="2">Mount myfile.zip,
2955 mydirectory</font></p>
2957 <p align="left">In this example, the file myfile.zip located in Skyscraper's
2958 data directory will be mounted as "mydirectory", and so a file such as test.jpg
2959 inside that zip file will appear as "mydirectory/test.jpg".</p>
2961 <p align="left"><strong>af. AddFloorAutoArea</strong> - defines an area that
2962 will automatically enable and disable floors when the user moves within it,
2963 similar to a stairwell<br>
2964 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloorAutoArea
2965 <em>x1, y1, z1, x2, y2, z2</em></font><br>
2966 Example: <font face="Courier New, Courier, mono" size="2">AddFloorAutoArea
2967 -100, 0, -100, 100, 100, 100</font></p>
2969 <p align="left"><strong>ag. AddSound</strong> - creates a user-defined sound at
2970 the specified position<br>
2971 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
2972 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
2973 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
2974 direction_x, direction_y, direction_z]</em></font><br>
2975 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
2976 sound.wav, 10, 100, 5, true<br>
2977 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
2978 MySound, ambient.ogg, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
2981 <p align="left">This command creates a custom sound in the specified position,
2982 and has a number of optional parameters - the defaults for the optional
2983 parameters are shown in Example 2. <em>Loop</em> specifies if the sound should
2984 loop and play on startup. If you're going to use any of the optional
2985 parameters, you must specify them all. <em>X</em>, <em>Y</em> and <em>Z</em>
2986 specify the location in 3D space that the sound will be at, <em>volume</em>
2987 specifies the volume percentage (with 1.0 being 100%) of the sound,
2988 <em>speed</em> determines the playback speed of the sound in percent,
2989 <em>min_distance</em> and <em>max_distance</em> set the minimum and maximum
2990 distances that the sound can be heard at full volume - by default, minimum is 1
2991 and maximum is -1. <em>Doppler_level </em>specifies the doppler scale for the
2992 sound (0 means off, the default, 1 is normal, 5 is max).
2993 <em>Cone_inside_angle</em> is the angle within which the sound is at it's
2994 normal volume (default 360), <em>cone_outside_angle</em> is the outside angle
2995 that the sound is at it's normal volume (default 360, shouldn't be less than
2996 the inside angle), and <em>cone_outside_volume</em> is the volume level of the
2997 sound outside (0.0 to 1.0, default 1.0)<em>. Direction_x</em>,
2998 <em>direction_y</em> and <em>direction_z</em> specify the direction of the
3001 <p align="left"><strong>ah. GetWallExtents</strong> - the GetWallExtents
3002 command returns the X and Z extents (minimum and maximum values) of a wall, at
3003 the specified altitude. The command will return the results in the MinX, MinZ,
3004 MaxX and MaxZ variables.<br>
3005 Syntax:<font face="Courier New, Courier, mono" size="2"> GetWallExtents
3006 <em>destobject, wallname, altitude</em></font><br>
3007 Example: <font face="Courier New, Courier, mono" size="2">GetWallExtents
3008 external, wall1:front, 10</font></p>
3010 <p align="left">Then to use the values:<br>
3011 Example: <font face="Courier New, Courier, mono" size="2">Set 2 =
3014 <p align="left"><em>Destobject</em> is the destination object to get the object
3015 from (floor, external, landscape, or buildings). <em>Wallname </em>specifies
3016 the name of the wall to get the extents from. Generally this should be in the
3017 form of "name:side", but if you leave out the "side" parameter, it'll choose
3018 one of the sides from a pre-defined search list. Sides of walls made from any
3019 AddWall command generally have "front", "back", "left" and "right" sides. Walls
3020 made using AddCustomWall and AddTriangleWall have sides of "0" (front) and "1"
3021 (back), so with those you'd specify "name:0" for the front. <em>Altitude</em>
3022 specifies the altitude to use for the check - basically it makes a copy of the
3023 wall, cuts it down to a line at that altitude, and returns the coordinates of
3024 the endpoints. The command will store the results in the MinX, MinZ, MaxX and
3025 MaxZ variables, which can be used anywhere in the script - to get the minimum X
3026 result, you'd use %minx%.</p>
3028 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ai.
3029 AddAction</strong> - defines an action, to be used by custom controls and
3031 Syntax:<font face="Courier New, Courier, mono" size="2"> AddAction <em>name,
3032 parent_object, command[, parameters</em></font><em>]<br>
3033 </em>Example:<font face="Courier New, Courier, mono" size="2"> AddAction
3034 MyAction, Floor 2, ChangeTexture, OldTexture, NewTexture</font><br>
3035 Example:<font face="Courier New, Courier, mono" size="2"> AddAction
3036 MySoundAction, Floor 2, PlaySound, Sound1, false</font><br>
3039 <p style="text-align:left;margin-left:0;margin-right:auto;">This command
3040 creates a global action, to be used with commands such as
3041 <em>AddActionControl</em> and <em>AddTrigger</em>. <em>Name</em> must be a
3042 globally-unique name. If the same name is used for multiple actions, all of
3043 those actions will be run when an object uses that name. <em>Parent_object</em>
3044 is the object to use to perform the action on. Currently includes "Global",
3045 floors such as "Floor 2", elevators such as "Elevator 1", shafts like "Shaft 1"
3046 stairwells like "Stairwell 2", and can also be specified as a range of objects,
3047 such as "Floors 3 to 8".</p>
3049 <p style="text-align:left;margin-left:0;margin-right:auto;">Commands and
3052 <p style="text-align:left;margin-left:0;margin-right:auto;">(General)<br>
3053 <em>ChangeTexture</em>: oldtexture, newtexture<br>
3054 <em>PlaySound</em>: name, loop true/false<br>
3055 <em>OpenShaftDoor</em>: door number (0 for all), floor number (parent needs to
3056 be the elevator object)<br>
3057 <em>CloseShaftDoor</em>: door number (0 for all), floor number (parent needs to
3058 be the elevator object)<br>
3059 <em>OpenShaftDoorManual</em>: door number (0 for all), floor number (parent
3060 needs to be elevator object)<br>
3061 <em>CloseShaftDoorManual</em>: door number (0 for all), floor number (parent
3062 needs to be elevator object)<br>
3063 (for other elevator commands, see the AddControl command in the elevator
3066 <p style="text-align:left;margin-left:0;margin-right:auto;">The
3067 <em>PlaySound</em> command plays sounds created with the AddSound command. With
3068 this command, if multiple sounds have the same name, all of those sounds will
3069 be played simultaneously when the related action is run.</p>
3071 <p style="text-align:left;margin-left:0;margin-right:auto;">OpenShaftDoor
3072 example, to open elevator 1's shaft doors on floor 2:</p>
3074 <p style="text-align:left;margin-left:0;margin-right:auto;"><font
3075 face="Courier New, Courier, mono" size="2">AddAction MyDoorOpen, Elevator 1,
3076 OpenShaftDoor, 0, 2</font></p>
3078 <p style="text-align:left;margin-left:0;margin-right:auto;">PlaySound example,
3079 to play sound FireAlarm created using the AddSound command on Floor 1:</p>
3081 <p style="text-align:left;margin-left:0;margin-right:auto;"><font
3082 face="Courier New, Courier, mono" size="2">AddAction MySound, Floor 1,
3083 FireAlarm, true</font></p>
3085 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aj.
3086 AddActionControl</strong> - creates a custom control that uses a specific
3087 action defined by AddAction.<br>
3088 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
3089 <em>name, sound, direction, centerx, centerz, width, height, voffset,
3090 action_name(s), texture_name(s)<br>
3091 </em></font>Example: <font face="Courier New, Courier, mono"
3092 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
3093 UndoMyAction, MyAction, Touch, TouchLit<br>
3095 AddActionControl command creates an advanced control similar to elevator button
3096 panel controls, but assigned to an action created with the AddAction command.
3097 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
3098 to specify a list of actions, and a list of textures to go along with those
3099 actions. There needs to be a texture for every action; if you specify 3 actions
3100 and only 2 textures, you will get an error. The control starts up in the first
3101 action, and switches to the next actions in sequence when it's clicked.
3102 <em>Direction</em> is the direction the control itself will face in 3D space
3103 (front, left, right, back). Leave the sound field blank for no sound to be
3106 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ak.
3107 AddTrigger</strong> - creates a trigger that is used to signal an action when
3108 the user's camera enters or leaves the defined area.<br>
3109 Syntax:<font face="Courier New, Courier, mono" size="2"> AddTrigger <em>name,
3110 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
3111 </em></font>Example:<font face="Courier New, Courier, mono"
3112 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
3113 UndoMyAction, MyAction</font><br>
3115 AddTrigger creates a trigger similar to action controls (AddActionControl) and
3116 elevator controls. The <em>action_names(s)</em> parameter allows you to specify
3117 a list of actions that this trigger will call when the camera enters or exits
3118 the area. The trigger starts in the first action, and will switch to each
3119 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
3120 <em>Z</em> parameters specify the 3D box that defines the trigger area. Leave
3121 the <em>sound</em> field blank for no sound to be played.</p>
3123 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>al.
3124 SetKey</strong> - specifies that the next created model will be a key. The
3125 model will be tagged with a specific key ID number, and when clicked, the key
3126 ID will be added to the user's keyring and the model will be deleted. The value
3127 must be greater than 0.<br>
3128 Syntax:<font face="Courier New, Courier, mono" size="2"> SetKey
3129 <em>keyid</em></font><br>
3130 Example: SetKey 1</p>
3132 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>am.
3133 SetLock</strong> - sets the lock and key parameters for subsequent doors,
3134 controls/buttons, and call buttons that are created.<br>
3135 Syntax:<font face="Courier New, Courier, mono" size="2"> SetLock
3136 <em>locked</em>, <em>keyid</em></font><br>
3137 Example: SetLock 1, 3</p>
3139 <p style="text-align:left;margin-left:0;margin-right:auto;">For doors,
3140 <em>locked</em> specifies which sides (directions) are locked. Values are:<br>
3142 1 - negative-facing (left/front) side locked<br>
3143 2 - positive-facing (right/back) side locked<br>
3144 3 - both sides locked</p>
3146 <p style="text-align:left;margin-left:0;margin-right:auto;">For
3147 controls/buttons and call buttons, the <em>locked</em> values are:<br>
3151 <p style="text-align:left;margin-left:0;margin-right:auto;">Locked objects can
3152 only be unlocked if the person has the key number specified as <em>keyid</em>.
3153 If <em>keyid</em> is 0, no key is needed to lock or unlock. To reset to the
3154 defaults, use 0 for the <em>locked</em> setting and 0 for <em>keyid</em>.<br>
3157 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>an.
3158 Print</strong> - prints the contents of a line to the console. This command
3159 will still convert variables and even math expressions, and output the
3161 Syntax: <font face="Courier New, Courier, mono" size="2">Print
3162 <em>text</em></font><br>
3163 Example: <font face="Courier New, Courier, mono" size="2">Print 1+1</font></p>
3165 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3167 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ao.
3168 Delete</strong> - deletes an object. This command is normally used after a
3169 building has loaded.<br>
3170 Syntax: <font face="Courier New, Courier, mono" size="2">Delete
3171 <em>object_number</em></font><br>
3172 Example: <font face="Courier New, Courier, mono" size="2">Delete 12</font></p>
3174 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3176 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ap.
3177 RunAction</strong> - runs an action by name. This command is normally used
3178 after a building has loaded.<br>
3179 Syntax: <font face="Courier New, Courier, mono" size="2">RunAction
3180 <em>name</em></font><br>
3181 Example: <font face="Courier New, Courier, mono" size="2">RunAction
3184 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3186 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aq.
3187 AddActionParent</strong> - adds a parent object to an existing action. See the
3188 AddAction command for details on parent objects<br>
3189 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionParent
3190 <em>name, object</em></font><br>
3191 Example: <font face="Courier New, Courier, mono" size="2">AddActionParent
3192 myaction, Elevator 2</font><br>
3193 Example: <font face="Courier New, Courier, mono" size="2">AddActionParent
3194 myaction, Floors 2 to 5</font></p>
3196 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3198 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ar.
3199 RemoveActionParent</strong> - removes a parent object from an existing action.
3200 See the AddAction command for details on parent objects. This command is
3201 normally used after a building has loaded.<br>
3202 Syntax: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3203 <em>name, object</em></font><br>
3204 Example: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3205 myaction, Elevator 2</font><br>
3206 Example: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3207 myaction, Floors 2 to 5</font></p>
3209 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3211 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>as.
3212 GotoFloor</strong> - jumps the user to the specified floor. This command is
3213 normally used after a building has loaded.<br>
3214 Syntax: <font face="Courier New, Courier, mono" size="2">GotoFloor
3215 <em>floor</em></font><br>
3216 Example: <font face="Courier New, Courier, mono" size="2">GotoFloor 3</font></p>
3218 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3220 <p align="left"><strong>at. EndPoint</strong> - the EndPoint function
3221 calculates endpoint coordinates given a starting point, direction (angle in
3222 degrees), and distance.<br>
3223 Syntax:<font face="Courier New, Courier, mono" size="2"> endpoint(<em>startx,
3224 starty, angle, distance</em>)</font><br>
3225 Example: <font face="Courier New, Courier, mono" size="2">endpoint(-150, 150,
3227 Result: <font face="Courier New, Courier, mono" size="2">-150, 130</font></p>
3229 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3233 <p align="left"> </p>
3235 <p align="left"><strong>8. END command</strong></p>
3237 <p align="left">The End command tells the software to stop processing the
3238 current script and start the simulation. This is optional.<br>
3239 Example: <font face="Courier New, Courier, mono" size="2"><end></font></p>
3241 <p align="left"><br>
3242 <strong>9. BREAK command</strong></p>
3244 <p align="left">The Break command triggers a break section in the script
3245 processor, and is used when running a debug build of the simulator, with a
3246 debugger attached. A breakpoint can be set on the associated line in
3247 fileio.cpp, and when this command is called, the debugger will hit the
3249 Example: <font face="Courier New, Courier, mono"
3250 size="2"><break></font></p>
3252 <p align="left"> </p>
3254 <p align="left"><strong><font size="+1"><a name="Functions"
3255 id="Functions"></a>9. Predefined Functions</font></strong></p>
3257 <p align="left">There are a number of script functions provided by the
3258 simulator. Currently there's only a single script for elevator doors - see the
3259 Simple building (noted at the bottom of this page) for an example. These
3260 functions can be used by putting this line in your script:</p>
3262 <p align="left"><font face="Courier New, Courier, mono" size="2"><Include
3263 data/scripts/elevator_doors.txt></font></p>
3265 <p align="left">You'll then be able to use some predefined door functions:</p>
3267 <p align="left"><strong>1. elevdoor_single</strong> - creates a single-slide
3269 Syntax: <font face="Courier New, Courier, mono"
3270 size="2">elevdoor_single(<em>door_number, texture, side_texture, thickness,
3271 CenterX, CenterZ, width, height, door_direction, movement_direction, speed,
3272 is_shaft_door</em>)</font></p>
3274 <p align="left"><em>Door_Direction</em> is either "left", "right", "front" or
3275 "back" and is the direction the doors face (torwards the outside of the
3276 elevator). <em>Movement_direction</em> is the direction the door should
3279 <p align="left"><strong>2. elevdoor_center</strong> - creates a center-open
3281 Syntax: <font face="Courier New, Courier, mono"
3282 size="2">elevdoor_center(<em>door_number, texture, side_texture, thickness,
3283 CenterX, CenterZ, width, height, door_direction, speed,
3284 is_shaft_door</em>)</font></p>
3286 <p align="left"><strong>3. elevdoor_center_classic</strong> - creates a
3287 center-open elevator door with a partially open interior door.<br>
3288 Syntax: <font face="Courier New, Courier, mono"
3289 size="2">elevdoor_center_classic(<em>door_number, texture, side_texture,
3290 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3291 is_shaft_door</em>)</font></p>
3293 <p align="left"><strong>4. elevdoor_dualspeed_left</strong> - creates a
3294 dual-speed door that opens to the left<br>
3295 Syntax: <font face="Courier New, Courier, mono"
3296 size="2">elevdoor_dualspeed_left(<em>door_number, texture, side_texture,
3297 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3298 is_shaft_door</em>)</font></p>
3300 <p align="left"><strong>5. </strong><strong>elevdoor_dualspeed_right</strong> -
3301 creates a dual-speed door that opens to the right<br>
3302 Syntax: <font face="Courier New, Courier, mono"
3303 size="2">elevdoor_dualspeed_right(<em>door_number, texture, side_texture,
3304 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3305 is_shaft_door</em>)</font></p>
3307 <p align="left"><strong>6. </strong><strong>elevdoor_center_dualspeed</strong>
3308 - creates a dual-speed center-open door<br>
3309 Syntax: <font face="Courier New, Courier, mono"
3310 size="2">elevdoor_center_dualspeed(<em>door_number, texture, side_texture,
3311 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3312 is_shaft_door</em>)</font></p>
3314 <p align="left"> </p>
3316 <p align="left"><strong><font size="+1"><a name="Example"></a>10. Small Example
3317 Building</font></strong></p>
3319 <p align="left">To see an example of a small simplistic building in code, look
3320 at the Simple.bld file in Skyscraper's buildings directory. It's also available
3322 href="http://cvs.tliquest.net/viewvc/*checkout*/skyscraper/buildings/Simple.bld">here</a>.</p>
3324 <p align="left"> </p>