OSDN Git Service

Fixed Visual C++ 64-bit build options
[skyscrapersim/skyscraper.git] / designguide.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4   <title>Skyscraper Building Design Guide</title>
5   <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
6 </head>
7
8 <body>
9
10 <div align="center">
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>
14 <hr>
15
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>
23
24 <p align="left"> </p>
25
26 <p align="center"><font size="+1"><strong><u>Contents</u></strong></font></p>
27
28 <p align="center"><a href="#Start">Starting a new building</a></p>
29
30 <p align="center"><a href="#General">General Stuff</a></p>
31
32 <p align="center"><a href="#Globals">Globals Section</a></p>
33
34 <p align="center"><a href="#Textures">Textures Section</a></p>
35
36 <p align="center"><a href="#Floor">Floor Sections</a></p>
37
38 <p align="center"><a href="#Elevator">Elevator Sections</a></p>
39
40 <p align="center"><a href="#GlobalCommands">Global Commands</a></p>
41
42 <p align="center"><a href="#Functions">Predefined Functions</a></p>
43
44 <p align="center"><a href="#Example">Example Building</a></p>
45
46 <p align="left"> </p>
47
48 <p align="left"><strong><font size="+1"><a name="Start"></a>1. Starting a new
49 building</font></strong></p>
50
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>
64
65 <p align="left"> </p>
66
67 <p align="left"><strong><font size="+1"><a name="General"></a>2. General
68 Stuff</font></strong></p>
69
70 <p align="left"><strong>1. Comments</strong></p>
71
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>
75
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>
80
81 <p align="left"><br>
82 <strong>2. Variables</strong></p>
83
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"
89 size="2"><br>
90 Height = %myvariable%<br>
91 <br>
92 </font></p>
93
94 <p align="left"><strong>3. IF/While statements</strong></p>
95
96 <p align="left">Basic IF and While statements can be made, with the following
97 syntax:<br>
98 <font face="Courier New, Courier, mono" size="2">if[<em>expression</em>]
99 command<br>
100 while[<em>expression</em>] command</font></p>
101
102 <p align="left">Available signs are = (equals), &gt; (greater than), &lt; (less
103 than), ! (is not), &amp; (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>
110
111 <p align="left">For example, to set the height to 9.5 if the floor number is
112 less than 82:<br>
113 <font face="Courier New, Courier, mono" size="2">if[%floor% &lt; 82] Height =
114 9.5</font></p>
115
116 <p align="left">This example shows a complex expression:<br>
117 <font face="Courier New, Courier, mono" size="2">if[%floor% &lt; 82 &amp;
118 (%height% = 3 | %height% = 5)] Height = 9.5</font></p>
119
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
122 3 or 5.<br>
123 <br>
124 </p>
125
126 <p align="left"><strong>4. Inline calculations</strong></p>
127
128 <p align="left">Values can be calculated inline by using the following math
129 operators: <br>
130 + (plus), - (minus), / (divide), * (multiply), and ^ (power of)</p>
131
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% +
135 10</font></p>
136
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>
141
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>
144
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>
147
148 <p align="left"><font face="Courier New, Courier, mono"
149 size="2">Floor(<em>number</em>).<em>parameter</em></font></p>
150
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
154 created.<br>
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>
158
159 <p align="left">Example:<font face="Courier New, Courier, mono" size="2"><br>
160 Set 1 = Floor(5).Altitude</font></p>
161
162 <p align="left"><strong><font face="Courier New, Courier, mono" size="2"><br>
163 </font>6. Includes</strong></p>
164
165 <p align="left">Other script files can be included (inserted) anywhere in the
166 current script by using the &lt;Include&gt; command. Scripts can be included
167 multiple times, and included scripts can include other scripts.</p>
168
169 <p align="left">Syntax:<br>
170 <font face="Courier New, Courier, mono" size="2">&lt;Include
171 <em>filename</em>&gt;</font></p>
172
173 <p align="left">To include a file called test.txt that's in the data folder,
174 you would enter:<br>
175 <font face="Courier New, Courier, mono" size="2"><br>
176 &lt;Include data/test.txt&gt;<br>
177 </font></p>
178
179 <p align="left"><br>
180 <strong>7. Functions</strong></p>
181
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 &lt;Floor&gt;.</p>
188
189 <p align="left">Syntax:<br>
190 <font face="Courier New, Courier, mono" size="2">&lt;Function
191 <em>name</em>&gt;<br>
192 <em>(code)</em><br>
193 &lt;EndFunction&gt; </font></p>
194
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
200 parameters:</p>
201
202 <p align="left">Syntax:<br>
203 <em>name</em>(<em>parameter1</em>, <em>parameter2</em>, ...)<br>
204 or<br>
205 name()<br>
206 <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>
213 </div>
214
215 <div align="left">
216 <p><font face="Courier New, Courier, mono" size="2">&lt;Function test&gt;<br>
217 SetAutoSize = %param1%, %param2%<br>
218 &lt;EndFunction&gt;<br>
219 <br>
220 test(false, false)</font></p>
221
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
224 loop a function:</p>
225
226 <p><font face="Courier New, Courier, mono" size="2">set a = 0<br>
227 &lt;Function testing&gt;<br>
228 set a = %a% + 1<br>
229 print %a%<br>
230 &lt;EndFunction&gt;<br>
231 <br>
232 while [%a% &lt; 5] testing()<br>
233 print finished</font></p>
234
235 <p>The console output of that ends up being:</p>
236
237 <p><font face="Courier New, Courier, mono" size="2">1<br>
238 2<br>
239 3<br>
240 4<br>
241 5<br>
242 finished</font></p>
243
244 <p align="left"><br>
245 <strong>8. Advanced Math Functions</strong></p>
246
247 <p align="left">Several built-in advanced math functions are provided, mostly
248 for trigonometric calculations.</p>
249
250 <p align="left">Syntax and descriptions:<br>
251 <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
267 division<br>
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>
273 </p>
274
275 <p></p>
276
277 <p></p>
278
279 <p></p>
280
281 <p></p>
282
283 <p> </p>
284 </div>
285
286 <div align="center">
287 <p align="left"><strong><font size="+1"><a name="Globals"></a>3. The
288 <em>Globals</em> Section</font></strong></p>
289
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">&lt;Globals&gt;</font></p>
293
294 <p align="left">and ends with this footer:<br>
295 <font face="Courier New, Courier, mono" size="2">&lt;EndGlobals&gt;</font></p>
296
297 <p align="left">Parameters are placed between those two markers, and look like
298 this:<br>
299 <font face="Courier New, Courier, mono" size="2">Parameter =
300 <em>value</em></font></p>
301
302 <p align="left">Example:<br>
303 <font face="Courier New, Courier, mono" size="2">Name = Triton Center</font></p>
304
305 <p align="left"><strong>Parameters (all are optional):</strong></p>
306
307 <p align="left"><strong>1. Name</strong> - building name<br>
308 Example: <font face="Courier New, Courier, mono" size="2">Name = My
309 Building</font></p>
310
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>
313 <br>
314 <strong>3. Location</strong> - location of the building<br>
315 <font face="Courier New, Courier, mono" size="2">Location = 100 Main
316 Street</font></p>
317
318 <p align="left"><strong>4. Description</strong> - Brief description of the
319 building<br>
320 <font face="Courier New, Courier, mono" size="2">Description = A really average
321 building</font><br>
322 <br>
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>
325 <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>
329 <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,
335 -10</font><br>
336 <br>
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,
341 28.8</font></p>
342
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,
349 0</font></p>
350
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>
355 </font></p>
356
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>
361 </font></p>
362
363 <p style="text-align:left;margin-left:0;margin-right:auto;">Available sky types
364 in data/caelum/sky.os file:<br>
365 DefaultBase<br>
366 DefaultSky<br>
367 BigPuffyStars<br>
368 BigPuffyStarsWithFogComposer<br>
369 MidnightSun<br>
370 Eclipse<br>
371 FogSky<br>
372 RainWind<br>
373 RainUp<br>
374 ShadowDebug<br>
375 HugeAmbientFactor<br>
376 BasicCloud<br>
377 OverrideCloud<br>
378 CloudMesh<br>
379 CloudFade<br>
380 SkyDomeOverrideHazeTest<br>
381 GroundFogNoise<br>
382 SandStormTest</p>
383
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 =
390 true</font></p>
391
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>
395
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>
399
400 <p align="left"> </p>
401
402 <p align="left"><strong><font size="+1"><a name="Textures"></a>4. The
403 <em>Textures</em> Section</font></strong></p>
404
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">&lt;Textures&gt;</font></p>
409
410 <p align="left">and ends with this footer:<br>
411 <font face="Courier New, Courier, mono" size="2">&lt;EndTextures&gt;</font></p>
412
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>
419
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
427 enabled.</p>
428
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>
437
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>
446
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
449 texture<br>
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,
454 2, 1, 1</font></p>
455
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>
467
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,
473 tile_y[, force]<br>
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>
490
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>
509
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,
518 255</font></p>
519
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>
538
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>
548
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>
555
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>
563
564 <p align="left"><strong>9. AddOverlay</strong> - draws an image on top of
565 another image<br>
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>
571
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>
585
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,
589 angle<br>
590 </em></font>Example: <font face="Courier New, Courier, mono" size="2">Rotate
591 Brick1, 30</font></p>
592
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>
596
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,
601 speed<br>
602 </em></font>Example: <font face="Courier New, Courier, mono"
603 size="2">RotateAnim Brick1, 0.2</font></p>
604
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>
608
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>
616
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
619 halfway.</p>
620
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,
625 x_speed, y_speed<br>
626 </em></font>Example: <font face="Courier New, Courier, mono"
627 size="2">ScrollAnim Brick1, 1, 1</font></p>
628
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>
632
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,
637 x_scale, y_scale<br>
638 </em></font>Example: <font face="Courier New, Courier, mono" size="2">Scale
639 Brick1, 30</font></p>
640
641 <p align="left">In the example, the Brick1 texture is scaled to half the size,
642 in both width and height.</p>
643
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>
652
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 &amp;
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 &gt; 0, the maximum if amplitude &lt; 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>
672
673 <p></p>
674
675 <p></p>
676 <br>
677
678
679 <p align="left"><strong><font size="+1"><a name="Floor"></a>5. The
680 <em>Floor</em> Sections</font></strong></p>
681
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">&lt;Floor
687 <em>number</em>&gt;</font><br>
688 and end with this:<br>
689 <font face="Courier New, Courier, mono" size="2">&lt;EndFloor&gt;</font><br>
690 For example, a floor section for a lobby would use this:<br>
691 <font face="Courier New, Courier, mono" size="2">&lt;Floor 0&gt;</font></p>
692
693 <p align="left">For multiple floors, the section would start with this:<br>
694 <font face="Courier New, Courier, mono" size="2">&lt;Floors <em>start</em> to
695 <em>finish</em>&gt;</font><br>
696 and end with this:<br>
697 <font face="Courier New, Courier, mono" size="2">&lt;EndFloors&gt;<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 &lt;Floors 5 to 10&gt;</font><br>Or to work with basement floors -1 to -5, you would type:
701 <font face="Courier New, Courier, mono" size="2"><br>&lt;Floors -1 to -5&gt;</font></p>
702
703 <p align="left">Ranges in this can be specified in either direction.  Floors above ground start with 0 (so a 15-story building would
704 have floors 0-14). Also, floors must be made in the proper order: basement
705 levels must be made first in decending order (-1, -2, -3 etc), and then
706 above-ground floors in ascending order (0, 1, 2, etc).</p>
707
708 <p align="left"><strong>Variables:</strong></p>
709
710 <p align="left"><font face="Courier New, Courier, mono"
711 size="2"><strong>%floor%</strong></font> - contains the current floor number<br>
712 <font face="Courier New, Courier, mono"
713 size="2"><strong>%height%</strong></font> - contains the current floor's
714 ceiling height<br>
715 <font face="Courier New, Courier, mono"
716 size="2"><strong>%interfloorheight%</strong></font> - contains the current
717 floor's interfloor height (spacing between floors)<br>
718 <font face="Courier New, Courier, mono"
719 size="2"><strong>%fullheight%</strong></font> - contains the current floor's
720 total height, including the interfloor height<br>
721 <font face="Courier New, Courier, mono" size="2"><strong>%base%</strong></font>
722 - if the InterfloorOnTop parameter in the Globals section is set to 'false'
723 (the default), then Base refers to the floor's altitude plus interfloor height;
724 otherwise it's the floor's altitude<br>
725 </p>
726
727 <p align="left"><strong>Parameters:</strong></p>
728
729 <p align="left"><strong>1. Name</strong> - the name of the current floor,
730 required<br>
731 Example: <font face="Courier New, Courier, mono" size="2">Name = Floor
732 %floor%</font></p>
733
734 <p align="left"><strong>2. ID</strong> - the floor indicator name for the
735 current floor, such as L (for Lobby), LL (lower level), M (Mezzanine), etc.
736 This is also used to determine what texture should be loaded for the elevator
737 floor indicators and floor signs. The texture name would be "Button[ID]" - so
738 if the ID is 10, the texture name would be "Button10".<br>
739 <font face="Courier New, Courier, mono" size="2">ID = %floor%</font></p>
740
741 <p align="left"><strong>3. Type</strong> - the type of floor the current floor
742 is. The types are still being defined, but the currently used ones are
743 Basement, Lobby, Mezzanine, Conference, Office, Service, Skylobby, Hotel,
744 Apartment, Condominium, Restaurant, Observatory, Recreation, Ballroom,
745 Communications, and Roof. (Required)<br>
746 <font face="Courier New, Courier, mono" size="2">Type = Office</font></p>
747
748 <p align="left"><strong>4. Description</strong> - description of the current
749 floor, optional<br>
750 <font face="Courier New, Courier, mono" size="2">Description =
751 Offices</font></p>
752
753 <p align="left"><strong>5. Height</strong> - the floor-to-ceiling height of the
754 current floor, required<br>
755 <font face="Courier New, Courier, mono" size="2">Height = 9.5</font></p>
756
757 <p align="left"><strong>6. InterfloorHeight</strong> - the height in feet of
758 the space between floors (below each floor), starting at the floor's altitude,
759 and ending right below the level's floor; required.<br>
760 <font face="Courier New, Courier, mono" size="2">InterfloorHeight =
761 2.24</font></p>
762
763 <p align="left"><strong>7. Altitude</strong> - this parameter is optional and
764 is only recommended if the first level has an interfloor area that needs to be
765 below ground. If this parameter is not used, the altitude will be calculated
766 automatically.<br>
767 <font face="Courier New, Courier, mono" size="2">Altitude = -2.24</font></p>
768
769 <p align="left"><strong>8. Group</strong> - group floors together. This is a
770 list of comma-separated floor numbers (or a range specified with the - symbol)
771 that should be enabled along with this floor when the user arrives at this
772 floor. For example, if a 2-story room has a balcony, and the room base and
773 balcony are separate floors, you would specify the other floor's number in this
774 parameter.<br>
775 Examples:<br>
776 <font face="Courier New, Courier, mono" size="2">Group = 5</font><br>
777 <font face="Courier New, Courier, mono" size="2">Group = 4, 5<br>
778 Group = 4 - 10</font></p>
779
780 <p align="left"><br>
781 <strong>Commands:</strong></p>
782
783 <p align="left"><strong>1. Exit</strong> - exits the current floor section</p>
784
785 <p align="left"><strong>2. AddFloor</strong> - adds a textured floor with the
786 specified dimensions to the current floor/level<br>
787 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloor <em>name,
788 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
789 <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis, texture_direction,
790 tw</em>, <em>th, isexternal</em></font><br>
791 Example: <font face="Courier New, Courier, mono" size="2">AddFloor My Floor,
792 brick, 0.5, -10, -10, 10, 10, 0, 0, False, False, 0, 0, False</font></p>
793
794 <p align="left"><em>Voffset1</em> and <em>voffset2</em> are the height in feet
795 above the current floor's altitude; <em>tw</em> and <em>th</em> are to
796 size/tile the texture (0 lets the app autosize them), and <em>isexternal</em>
797 determines if the floor is part of the building's external framework, or is
798 part of the current floor (is either True or False). <em>Name</em> is a
799 user-defined name for the object. The <em>reverse_axis</em> parameter reverses
800 the axis that the difference in altitude/voffset for floors corresponds to. If
801 this is false, and the altitude values are different, the floor will angle
802 upward/downward along the Z axis (front/back), and if set to true, the floor
803 will angle along the X axis (left/right). If <em>texture_direction</em> is
804 false, the texture will be mapped horizontally on the floor; if true, it'll be
805 mapped vertically.</p>
806
807 <p align="left"><strong>3. AddWall</strong> - adds a textured wall with the
808 specified dimensions to the current floor/level<br>
809 Syntax: <font face="Courier New, Courier, mono" size="2">AddWall <em>name,
810 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
811 <em>z2</em>, <em>height1</em>, <em>height2</em>, <em>voffset1</em>,
812 <em>voffset2</em>, <em>tw</em>, <em>th</em>, <em>isexternal</em></font><br>
813 Example: <font face="Courier New, Courier, mono" size="2">AddWall My Wall,
814 brick, 0.5, -10, -10, 10, 10, 10, 10, 0, 0, 0, 0, False</font></p>
815
816 <p align="left"><em>Height1</em> is the wall height in feet at the first
817 coordinate set (x1 and z1), and <em>height2</em> is for the second set (x2, and
818 z2). <em>Voffset1</em> is the vertical offset in feet (from the floor's
819 altitude) for the first coordinate set, and <em>voffset2</em> is for the second
820 set. <em>Tw</em> and <em>th</em> are the texture sizing/tiling multipliers, and
821 <em>isexternal</em> determines if the wall is part of the building's external
822 framework (true) or if it's part of the current floor (false).</p>
823
824 <p align="left"><strong>4. AddInterfloorFloor</strong> - adds a textured floor
825 below the floor of the current floor/level<br>
826 Syntax: <font face="Courier New, Courier, mono" size="2">AddInterfloorFloor
827 <em>name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
828 <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis, texture_direction,
829 tw</em>, <em>th</em></font><br>
830 Example: <font face="Courier New, Courier, mono" size="2">AddInterfloorFloor My
831 IFloor, brick, 0.5, -10, -10, 10, 10, 0, 0, 0, 0</font></p>
832
833 <p align="left">The parameters are the same as the AddFloor command, except the
834 <em>voffset</em> values are the height offset in feet above the current floor's
835 altitude, and not above the base floor level.</p>
836
837 <p align="left"><strong>5. AddInterfloorWall</strong> - adds a textured wall
838 below the floor of the current floor/level<br>
839 Syntax: <font face="Courier New, Courier, mono" size="2">AddInterfloorWall
840 <em>name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
841 <em>z2</em>, <em>height1</em>, <em>height2</em>, <em>voffset1</em>,
842 <em>voffset2</em>, <em>tw</em>, <em>th</em></font></p>
843
844 <p align="left">The parameters are the same as the AddWall command, and the
845 <em>voffset</em> values are the same as the AddInterfloorFloor command.</p>
846
847 <p align="left"><strong>6. AddShaftFloor</strong> - adds a textured floor to
848 the specified shaft, on the current floor<br>
849 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftFloor
850 <em>number, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
851 <em>x2</em>, <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis,
852 texture_direction, tw</em>, <em>th</em></font><br>
853 Example: <font face="Courier New, Courier, mono" size="2">AddShaftFloor 1, My
854 Floor, brick, 0.5, -10, -10, 10, 10, 0, 0, false, false, 0, 0</font></p>
855
856 <p align="left">The parameters are the same as the AddFloor command, and the
857 <em>number</em> value is the shaft number to use. The <em>x1</em>, <em>z1</em>,
858 <em>x2,</em> and <em>z2</em> parameters are offsets of the shaft's origin
859 (similar to creating elevator walls and floors)</p>
860
861 <p align="left"><strong>7. AddShaftWall</strong> - adds a textured wall to the
862 specified shaft, on the current floor<br>
863 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftWall
864 <em>number, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
865 <em>x2</em>, <em>z2</em>, <em>height1</em>, <em>height2</em>,
866 <em>voffset1</em>, <em>voffset2</em>, <em>tw</em>, <em>th</em></font></p>
867
868 <p align="left">The parameters are the same as the AddWall command, and the
869 <em>number</em> value is the shaft number to use. Also, the <em>x1</em>,
870 <em>z1</em>, <em>x2,</em> and <em>z2</em> parameters are offsets of the shaft's
871 origin (similar to creating elevator walls and floors)</p>
872
873 <p align="left"><strong>8. AddStairsFloor</strong> - adds a textured floor to
874 the specified stairwell, on the current floor<br>
875 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsFloor
876 <em>number, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
877 <em>x2</em>, <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis,
878 texture_direction, tw</em>, <em>th</em></font><br>
879 Example: <font face="Courier New, Courier, mono" size="2">AddStairsFloor 1, My
880 Floor, brick, 0.5, -10, -10, 10, 10, 0, 0, false, false, 0, 0</font></p>
881
882 <p align="left">The parameters are the same as the AddFloor command, and the
883 <em>number</em> value is the stairwell number to use</p>
884
885 <p align="left"><strong>9. AddStairsWall</strong> - adds a textured wall to the
886 specified stairwell, on the current floor<br>
887 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsWall
888 <em>number, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
889 <em>x2</em>, <em>z2</em>, <em>height1</em>, <em>height2</em>,
890 <em>voffset1</em>, <em>voffset2</em>, <em>tw</em>, <em>th</em></font></p>
891
892 <p align="left">The parameters are the same as the AddWall command, and the
893 <em>number</em> value is the stairwell number to use. Also, the <em>x1</em>,
894 <em>z1</em>, <em>x2</em>, and <em>z2</em> parameters are offsets of the
895 stairwell's origin (similar to creating elevator walls and floors) </p>
896
897 <p align="left"><strong>10. ColumnWallBox</strong> - creates 4 walls (box) at
898 the specified coordinate locations, as part of the current floor's columnframe
899 mesh<br>
900 Syntax: <font face="Courier New, Courier, mono" size="2">ColumnWallBox
901 <em>name, texturename</em>, <em>x1</em>, <em>x2</em>, <em>z1</em>, <em>z2</em>,
902 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th, inside, outside, top,
903 bottom </em></font><br>
904 Example: <font face="Courier New, Courier, mono" size="2">ColumnWallBox My Box,
905 brick, -10, 10, -10, 10, 15, 0, 0, 0, true, true, true, true</font></p>
906
907 <p align="left">For parameter information, see the CreateWallBox command above.
908 In this command, the default voffset is the floor's altitude.</p>
909
910 <p align="left"><strong>11. ColumnWallBox2</strong> - creates 4 walls (box) at
911 a specified central location, as part of the current floor's columnframe mesh
912 <br>
913 Syntax: <font face="Courier New, Courier, mono" size="2">ColumnWallBox2
914 <em>name, texturename</em>, <em>centerx</em>, <em>centerz</em>,
915 <em>widthx</em>, <em>lengthz</em>, <em>height</em>, <em>voffset</em>,
916 <em>tw</em>, <em>th</em><em>, inside, outside, top, bottom </em></font><br>
917 Example: <font face="Courier New, Courier, mono" size="2">ColumnWallBox2 My
918 Box, brick, 0, 0, 10, 10, 15, 0, 0, 0, false, true, false, false</font></p>
919
920 <p align="left">For parameter information, see the CreateWallBox2 command
921 above. In this command, the default voffset is the floor's altitude.</p>
922
923 <p align="left"><strong>12. CallButtonElevators</strong> - comma-separated list
924 of elevators the next created call button set will work with (this must be
925 specified before CreateCallButtons)<br>
926 Example: <font face="Courier New, Courier, mono" size="2">CallButtonElevators =
927 1, 2, 3, 4</font></p>
928
929 <p align="left"><strong>13. CreateCallButtons</strong> - creates a call button
930 set<br>
931 Syntax: <font face="Courier New, Courier, mono" size="2">CreateCallButtons
932 <em>Sound</em>, <em>BackTexture</em>, <em>UpButtonTexture</em>, <em>UpButtonTexture_Lit,
933 DownButtonTexture, DownButtonTexture_Lit, CenterX, CenterZ, voffset, direction,
934 BackWidth, BackHeight, ShowBack, tw, th<br>
935 </em></font>Example: <font face="Courier New, Courier, mono"
936 size="2">CreateCallButtons switch.wav, Marble, CallButtonsUp, CallButtonsUpLit,
937 CallButtonsDown, CallButtonsDownLit, -10, 0, 4, right, 0.5, 1, true, 1,
938 1</font></p>
939
940 <p align="left"><em>Sound</em> is the filename of the sound to play when the call buttons are pressed</p>
941
942 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
943 the buttons</p>
944
945 <p align="left"><em>UpButtonTexture</em> and <em>DownButtonTexture</em> are the
946 textures used for the buttons themselves (unlit). <em>UpButtonTexture_Lit</em>
947 and <em>DownButtonTexture_Lit</em> specify the lit button textures.</p>
948
949 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
950 of the call button set object</p>
951
952 <p align="left"><em>voffset</em> is the altitude offset that the object is
953 above each floor</p>
954
955 <p align="left"><em>direction </em>determines the direction the call buttons
956 face:<br>
957 'front' means they face towards the front of the building<br>
958 'back' means they face towards the back of the building<br>
959 'left' means they face left<br>
960 'right' means they face right</p>
961
962 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
963 height of the wall plate</p>
964
965 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
966 and is either true or false</p>
967
968 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
969 wall plate.</p>
970
971 <p align="left">The up and down buttons will be automatically created based on
972 the combined range of the elevators specified with the CallButtonElevators command
973 (above).</p>
974
975 <p align="left"><strong>14. AddStairs</strong> - creates a custom staircase at
976 the specified location.<br>
977 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairs <em>number,
978 name, texture, direction, CenterX, CenterZ, width, risersize, treadsize,
979 num_stairs, voffset, tw, th</em></font><br>
980 Example: <font face="Courier New, Courier, mono" size="2">AddStairs 1,
981 TestStairs, Brick, left, 10, 15, 5, 0.5, 0.5, 10, 0, 0, 0</font></p>
982
983 <p align="left">The <em>direction</em> parameter specifies the direction the
984 staircase faces (where the bottom step is), and so if a staircase goes up from
985 left to right, the direction would be <em>left</em>. <em>Width</em> specifies
986 the step width; <em>risersize</em> specifies the height of each step riser
987 (vertical portion); <em>treadsize</em> specifies the length of each step
988 tread/run (horizontal portion); <em>num_stairs</em> specifies the total number
989 of steps to create (including the above landing platform, but not including the
990 base platform). To calculate the length of the staircase, multiply
991 <em>(num_stairs</em> - 1) with <em>treadsize</em>; in the above example, that
992 would be 9 * 0.5. To determine the height of the staircase, multiply
993 <em>num_stairs</em> with <em>risersize</em>. Note that the tread of the top
994 step is not drawn (the top step is the landing platform); therefore for a
995 staircase containing 10 steps, the total staircase width would be comprised of
996 9 treads (which is why the length calculation used num_stairs minus 1).</p>
997
998 <p align="left"><strong>15. AddDoor</strong> - adds a textured door in the
999 specified location, and performs a wall cut on that area (this must be called
1000 after the associated wall is created)<br>
1001 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoor <em>opensound,
1002 closesound, open, texturename, thickness</em>, <em>direction, speed,
1003 CenterX</em>, <em>CenterZ</em>, <em>width</em>, <em>height</em>,
1004 <em>voffset</em>, <em>tw</em>, <em>th<br>
1005 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddDoor
1006 1, , , False, DoorTexture, 0.2, 1, 0, -8.5, 0, 3.5, 8, 0, 1, 1</font></p>
1007
1008 <p align="left"><em>Direction</em> specifies the direction the door faces (the
1009 side in which the handle is on the left) and also the direction it opens. These
1010 are the values:<br>
1011 1 - faces left, opens left<br>
1012 2 - faces left, opens right<br>
1013 3 - faces right, opens right<br>
1014 4 - faces right, opens left<br>
1015 5 - faces front, opens front<br>
1016 6 - faces front, opens back<br>
1017 7 - faces back, opens back<br>
1018 8 - faces back, opens front</p>
1019
1020 <p align="left">The default door speed is 75; you can also specify 0 for the
1021 speed to use the system default. The <em>open</em> parameter determines if the
1022 door should be opened on start; default is false. Leave the sound fields blank
1023 for no sounds to be played.<br>
1024 </p>
1025
1026 <p align="left"><strong>16. AddStairsDoor</strong> - adds a textured door for
1027 the specified stairwell, in a location relative to the stairwell's center. This
1028 also performs a wall cut on that area (this must be called after the associated
1029 wall is created)<br>
1030 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsDoor
1031 <em>number, opensound, closesound, open, texturename, thickness</em>,
1032 <em>direction, speed, CenterX</em>, <em>CenterZ</em>, <em>width</em>,
1033 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font></p>
1034
1035 <p align="left"><em>Number</em> specifies the stairwell number.
1036 <em>Direction</em> specifies the direction the door faces and also the
1037 direction it opens. For values of this, look at the AddDoor command above.
1038 Leave the <em>sound</em> fields blank for no sounds to be played.</p>
1039
1040 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>17.
1041 AddShaftStdDoor</strong> - adds a standard textured door for the specified
1042 shaft, in a location relative to the shaft's center. This also performs a wall
1043 cut on that area (this must be called after the associated wall is created).
1044 This shouldn't be confused with the AddShaftDoor command, which creates
1045 elevator shaft doors.<br>
1046 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftStdDoor
1047 <em>number, opensound, closesound, open, texturename, thickness</em>,
1048 <em>direction, speed, CenterX</em>, <em>CenterZ</em>, <em>width</em>,
1049 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font><em><br>
1050 <br>
1051 Number</em> specifies the shaft number. <em>Direction</em> specifies the
1052 direction the door faces and also the direction it opens. For values of this,
1053 look at the AddDoor command above. Leave the <em>sound</em> fields blank for no
1054 sounds to be played.</p>
1055
1056 <p align="left"><strong>17. AddDirectionalIndicator</strong> - creates a single
1057 elevator directional indicator/lantern on the current floor (similar to the
1058 CreateCallButtons command) <br>
1059 Syntax: <font face="Courier New, Courier, mono"
1060 size="2">AddDirectionalIndicator<em> Elevator, Relative, ActiveDirection,
1061 Single, Vertical, BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit,
1062 DownTexture, DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth,
1063 BackHeight, ShowBack, tw, th<br>
1064 </em></font>Example: <font face="Courier New, Courier, mono"
1065 size="2"><em>AddDirectionalIndicator 1, true, false, false, true, Metal,
1066 UpLight, UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true,
1067 0, 0</em></font></p>
1068
1069 <p align="left">This command will create a directional indicator on the current
1070 floor (if <em>ActiveDirection</em> is false, then it'll only create it if the
1071 elevator serves that floor). It'll also automatically create the up and down
1072 lights depending on the floor.</p>
1073
1074 <p align="left"><em>Elevator</em> specifies the elevator to create the
1075 indicators for.</p>
1076
1077 <p align="left"><em>Relative</em> determines if the X and Z coordinates are
1078 relative to the elevator's origin (center) or not.</p>
1079
1080 <p align="left"><em>ActiveDirection</em> determines if the indicator should
1081 continuously display the active elevator direction (true), or if it should show
1082 the elevator's direction for the current call (false, default)</p>
1083
1084 <p align="left"><em>Single</em> determines if a single indicator light should
1085 be created instead of two. If this is true, the unlit texture is specified in
1086 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
1087
1088 <p align="left"><em>Vertical</em> determines if the two lights should be
1089 vertically separated (true), or horizontally separated (false)</p>
1090
1091 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
1092 the lights</p>
1093
1094 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
1095 used for the lights themselves, and the "Lit" texures are the ones to show when
1096 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
1097
1098 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
1099 of the indicators</p>
1100
1101 <p align="left"><em>voffset</em> is the altitude offset that the object is
1102 above each floor</p>
1103
1104 <p align="left"><em>direction </em>determines the direction the indicators
1105 face:<br>
1106 'front' means they face towards the front of the building<br>
1107 'back' means they face towards the back of the building<br>
1108 'left' means they face left<br>
1109 'right' means they face right</p>
1110
1111 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
1112 height of the wall plate</p>
1113
1114 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
1115 and is either true or false</p>
1116
1117 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
1118 wall plate.</p>
1119
1120 <p align="left"><strong>18. AddShaftDoor</strong> - creates shaft elevator
1121 doors on the current floor only<br>
1122 Syntax: <font face="Courier New, Courier, mono"
1123 size="2">AddShaftDoor<em> elevator, number, lefttexture, righttexture</em>,
1124 <em>thickness, CenterX, CenterZ, voffset, tw, th</em></font><br>
1125 Syntax (with old SetShaftDoors command): <font
1126 face="Courier New, Courier, mono" size="2">AddShaftDoor<em> elevator, number,
1127 lefttexture, righttexture</em>, <em>tw, th</em></font></p>
1128
1129 <p align="left">The AddShaftDoor command creates working shaft elevator doors
1130 on the current floor only - the other command, <em>AddShaftDoors</em> (in the
1131 <em>elevator</em> section) creates all shaft doors in a single command. This
1132 command is useful for specifying different textures for shaft doors depending
1133 on the floor, and also for only creating shaft doors on one side if an elevator
1134 serves a specific floor. The <em>SetShaftDoors</em> command in the elevator
1135 section must be used before using this command. Parameters such as width,
1136 height, and direction are taken from the <em>AddDoors</em> command (so the
1137 regular elevator doors need to be created first). The <em>voffset</em>
1138 parameter allows you to create shaft doors at a different vertical position
1139 than the base of the floor, and the elevator will automatically stop according
1140 to the shaft door's voffset for that floor. These doors should be moved
1141 slightly away from the elevator doors (to separate them both). Also, this
1142 command cuts any shaft walls that are within the door area (and so this must be
1143 called after the shaft walls are created). <em>Number</em> specifies the number
1144 of the door to create (related to the <em>Doors</em> command) - if the elevator
1145 only has one door, or if the <em>Doors</em> command was not used, specify 1
1146 here.</p>
1147
1148 <p align="left"><strong>19. AddFloorIndicator</strong> - creates a floor
1149 indicator associated with a specific elevator<br>
1150 Syntax: <font face="Courier New, Courier, mono"
1151 size="2">AddFloorIndicator<em> elevator, relative, texture_prefix, direction,
1152 CenterX, CenterZ, width, height, voffset</em></font> </p>
1153
1154 <p align="left">The AddFloorIndicator command creates a floor indicator at the
1155 position specified by <em>CenterX</em> and <em>CenterZ</em>, associated with
1156 the elevator specified by <em>elevator</em>. <em>Direction</em> is the
1157 direction the indicator faces, and can be either "left", "right", "front" or
1158 "back". <em>Relative</em> determines if the <em>CenterX</em> and
1159 <em>CenterZ</em> values are relative of the elevator's center or not. This
1160 command can be given multiple times to create multiple indicators.
1161 <em>Texture_prefix</em> is the base name of the texture to load when displaying
1162 a floor ID; for example if the indicator is on floor 3, and you specify a
1163 prefix of "Button", it'll load the "Button3" texture.</p>
1164
1165 <p align="left"><strong>20. Cut</strong> - performs a manual box cut on an area
1166 within the current floor<br>
1167 Syntax: <font face="Courier New, Courier, mono" size="2">Cut <em>x1, y1, z1,
1168 x2, y2, z2, cutwalls, cutfloors</em><br>
1169 </font>Example: <font face="Courier New, Courier, mono" size="2">Cut -5, -5,
1170 -5, 5, 5, 5, false, true</font></p>
1171
1172 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
1173 start and end coordinates of the box cut. The Y values are relative to the
1174 current floor's altitude. If <em>cutwalls</em> is true, the function will cut
1175 walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
1176
1177 <p align="left"><strong>21. CutAll</strong> - performs a manual box cut on all
1178 objects associated with the current floor (the level itself, interfloor,
1179 shafts, stairs and external)<br>
1180 Syntax: <font face="Courier New, Courier, mono" size="2">CutAll <em>x1, y1, z1,
1181 x2, y2, z2, cutwalls, cutfloors</em><br>
1182 </font>Example: <font face="Courier New, Courier, mono" size="2">CutAll -5, -5,
1183 -5, 5, 5, 5, false, true</font></p>
1184
1185 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
1186 start and end coordinates of the box cut. The Y values are relative to the
1187 current floor's altitude. If <em>cutwalls</em> is true, the function will cut
1188 walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
1189
1190 <p align="left"><strong>22. AddFillerWalls</strong> - helper function to add
1191 fillers around a door's cut location. When a door is created, the wall in it's
1192 location is cut to provide space; after the cut, the sides are open (if the
1193 wall has thickness) - this creates a covering wall on each side and a floor
1194 above the door frame to fill the area.<br>
1195 Syntax: <font face="Courier New, Courier, mono" size="2">AddFillerWalls
1196 <em>texture, thickness, CenterX, CenterZ, width, height, voffset, direction,
1197 tw, th</em><br>
1198 </font>Example: <font face="Courier New, Courier, mono" size="2">AddFillerWalls
1199 ConnectionWall, 0.5, -10, 0, 3.5, 8, 0, true, 0, 0</font></p>
1200
1201 <p align="left">The parameters in this function are similar to the related
1202 door's parameters. <em>Direction</em> is either true if the door faces the
1203 front/back (width is along the X axis), or false if the door faces left/right
1204 (width is along the Z axis).</p>
1205
1206 <p align="left"><strong>23. AddSound</strong> - creates a user-defined sound at
1207 the specified position<br>
1208 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
1209 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
1210 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
1211 direction_x, direction_y, direction_z]</em></font><br>
1212 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
1213 sound.wav, 10, 100, 5, true<br>
1214 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
1215 MySound, sound.wav, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
1216 0</font></p>
1217
1218 <p align="left">For information on the parameters, see the AddSound command in
1219 the Globals section. The only difference here is that the Y value is relative
1220 of the floor's base (altitude plus interfloor height). <em>Loop</em> specifies
1221 if the sound should loop and play on startup.</p>
1222
1223 <p align="left"><strong>24. AddShaftDoorComponent</strong> - creates a single
1224 shaft door component, used for creating custom door styles<br>
1225 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoorComponent
1226 <em>elevator, number, name, texture, sidetexture, thickness, direction,
1227 openspeed, closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
1228 side_th</em></font></p>
1229
1230 <p align="left">This command is almost identical to the AddDoorComponent
1231 command (in the elevator section below - see that for more information), except
1232 that it creates shaft doors. Use the FinishShaftDoor command after creating the
1233 components. The components don't need to line up with the floor's base; the
1234 elevator will automatically stop at the base of the shaft door for each floor.
1235 This command replaces the AddShaftDoor command.</p>
1236
1237 <p align="left"><strong>25. FinishShaftDoor</strong> - finishes shaft door
1238 creation - use this after all related AddShaftDoorComponent commands are used,
1239 or specify it without the AddShaftDoorComponent commands if you're creating a
1240 manual shaft door.<br>
1241 Syntax: <font face="Courier New, Courier, mono"
1242 size="2">FinishShaftDoor<em> elevator, number[, door_walls, track_walls]</em></font></p>
1243
1244 <p align="left">This command is almost identical to the FinishDoors command (in
1245 the elevator section below - see that for more information) except that it's
1246 used for finishing a shaft door.</p>
1247
1248 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>26.
1249 AddModel</strong> - adds a 3D model to the floor. The model's
1250 textures/materials must be defined in a separate ".material" file, and a
1251 separate collider mesh ".collider" will be loaded. If a collider mesh isn't
1252 available, a simple box collider will be created.<br>
1253 Syntax: <font face="Courier New, Courier, mono" size="2">AddModel<em> name,
1254 filename, center, CenterX, CenterY, CenterZ, RotationX, RotationY, RotationZ,
1255 MaxRenderDistance, ScaleMultiplier, EnablePhysics, Restitution, Friction,
1256 Mass</em><em><br>
1257 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
1258 MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font><br>
1259 Example:<font face="Courier New, Courier, mono" size="2"> AddModel MyModel,
1260 cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, true, 0.1, 0.5, 0.1</font></p>
1261
1262 <p></p>
1263
1264 <p align="left">The <em>Center</em> value is either true or false, and
1265 determines if the loaded model should be automatically centered, otherwise the
1266 exact mesh positioning in the model file will be used. The <em>CenterY</em>
1267 value is relative to the current floor's base. <em>MaxRenderDistance</em>
1268 determines the maximum distance in feet that the object will be shown (0 means
1269 unlimited). <em>ScaleMultiplier</em> allows you to change the size of the
1270 object during the load - for example, set to 2 to double the size. Models are
1271 in the OGRE native mesh format. In the example, the material/texture file is
1272 cube.material, and the optional collider mesh file is cube.collider.
1273 <em>EnablePhysics</em> enables Bullet physics on the object (physics will only
1274 work if you don't provide a collider mesh), and <em>Restitution</em>,
1275 <em>Friction</em> and <em>Mass</em> determine the physical properties of the
1276 object.</p>
1277
1278 <p align="left"><strong>27. AddStairsModel</strong> - adds a 3D model to the
1279 specified stairwell, on the current floor. See the AddModel command above for
1280 parameter information.<br>
1281 Syntax: <font face="Courier New, Courier, mono"
1282 size="2">AddStairsModel<em> number, name, filename, center, CenterX, CenterY,
1283 CenterZ, RotationX, RotationY, RotationZ, MaxRenderDistance, ScaleMultiplier,
1284 EnablePhysics, Restitution, Friction, Mass</em><em><br>
1285 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
1286 1, MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font></p>
1287
1288 <p align="left">The <em>CenterY</em> value is relative to the current floor's
1289 altitude. </p>
1290
1291 <p align="left"><strong>28. AddShaftModel</strong> - adds a 3D model to the
1292 specified shaft, on the current floor. See the AddModel command above for
1293 parameter information.<br>
1294 Syntax: <font face="Courier New, Courier, mono"
1295 size="2">AddShaftModel<em> number, name, filename, center, CenterX, CenterY,
1296 CenterZ, RotationX, RotationY, RotationZ, MaxRenderDistance, ScaleMultiplier,
1297 EnablePhysics, Restitution, Friction, Mass</em><em><br>
1298 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
1299 1, MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font></p>
1300
1301 <p align="left">The <em>CenterY</em> value is relative to the current floor's
1302 altitude. </p>
1303
1304 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>29.
1305 AddActionControl</strong> - creates a custom control that uses a specific
1306 action defined by AddAction.<br>
1307 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
1308 <em>name, sound, direction, centerx, centerz, width, height, voffset,
1309 action_name(s), texture_name(s)<br>
1310 </em></font>Example: <font face="Courier New, Courier, mono"
1311 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
1312 UndoMyAction, MyAction, Touch, TouchLit<br>
1313 </font><br>
1314 AddActionControl command creates an advanced control similar to elevator button
1315 panel controls, but assigned to an action created with the AddAction command.
1316 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
1317 to specify a list of actions, and a list of textures to go along with those
1318 actions. There needs to be a texture for every action; if you specify 3 actions
1319 and only 2 textures, you will get an error. The control starts up in the first
1320 action, and switches to the next actions in sequence when it's clicked.
1321 <em>Direction</em> is the direction the control itself will face in 3D space
1322 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1323 Leave the <em>sound</em> field blank for no sound to be played.</p>
1324
1325 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>30.
1326 AddShaftActionControl</strong> - creates a custom control in a specified shaft
1327 that uses a specific action defined by AddAction.<br>
1328 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftActionControl
1329 <em>number, name, sound, direction, centerx, centerz, width, height, voffset,
1330 action_name(s), texture_name(s)<br>
1331 </em></font>Example: <font face="Courier New, Courier, mono"
1332 size="2">AddShaftActionControl 1, MyControl, switch.wav, front, -10, 10, 1.5,
1333 1.5, 4, UndoMyAction, MyAction, Touch, TouchLit<br>
1334 </font><br>
1335 This command creates an advanced control similar to elevator button panel
1336 controls, but assigned to an action created with the AddAction command. The
1337 <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you to
1338 specify a list of actions, and a list of textures to go along with those
1339 actions. There needs to be a texture for every action; if you specify 3 actions
1340 and only 2 textures, you will get an error. The control starts up in the first
1341 action, and switches to the next actions in sequence when it's clicked.
1342 <em>Direction</em> is the direction the control itself will face in 3D space
1343 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1344 Leave the <em>sound</em> field blank for no sound to be
1345 played.<strong></strong></p>
1346
1347 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>31.
1348 AddStairsActionControl</strong> - creates a custom control in a specified
1349 stairwell that uses a specific action defined by AddAction.<br>
1350 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsActionControl
1351 <em>number, name, sound, direction, centerx, centerz, width, height, voffset,
1352 action_name(s), texture_name(s)<br>
1353 </em></font>Example: <font face="Courier New, Courier, mono"
1354 size="2">AddStairsActionControl 1, MyControl, switch.wav, front, -10, 10, 1.5,
1355 1.5, 4, UndoMyAction, MyAction, Touch, TouchLit<br>
1356 </font><br>
1357 This command creates an advanced control similar to elevator button panel
1358 controls, but assigned to an action created with the AddAction command. The
1359 <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you to
1360 specify a list of actions, and a list of textures to go along with those
1361 actions. There needs to be a texture for every action; if you specify 3 actions
1362 and only 2 textures, you will get an error. The control starts up in the first
1363 action, and switches to the next actions in sequence when it's clicked.
1364 <em>Direction</em> is the direction the control itself will face in 3D space
1365 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1366 Leave the <em>sound</em> field blank for no sound to be
1367 played.<strong></strong></p>
1368
1369 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>32.
1370 AddTrigger</strong> - creates a trigger that is used to signal an action when
1371 the user's camera enters or leaves the defined area.<br>
1372 Syntax: <font face="Courier New, Courier, mono" size="2">AddTrigger <em>name,
1373 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
1374 </em></font>Example:<font face="Courier New, Courier, mono"
1375 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
1376 UndoMyAction, MyAction</font><br>
1377 <br>
1378 AddTrigger creates a trigger similar to action controls (AddActionControl) and
1379 elevator controls. The <em>action_names(s)</em> parameter allows you to specify
1380 a list of actions that this trigger will call when the camera enters or exits
1381 the area. The trigger starts in the first action, and will switch to each
1382 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
1383 <em>Z</em> parameters specify the 3D box that defines the trigger area. Y is
1384 relative of the floor's base. Leave the <em>sound</em> field blank for no sound
1385 to be played.</p>
1386
1387 <p align="left"><strong></strong></p>
1388
1389 <p align="left"><strong><font size="+1"><a name="Elevator"></a>6. The
1390 <em>Elevator</em> Section</font></strong></p>
1391
1392 <p align="left">The <em>Elevator</em> section allows you to create elevators
1393 for your building. Elevators are numbered, starting with 1. Parameters that
1394 have defaults listed are optional.</p>
1395
1396 <p align="left">The section headers and footers are similar to the ones in the
1397 Floor section.<br>
1398 To specify a single elevator, you would type something like:<br>
1399 <font face="Courier New, Courier, mono" size="2">&lt;Elevator 1&gt;</font><br>
1400 and end it with:<br>
1401 <font face="Courier New, Courier, mono" size="2">&lt;EndElevator&gt;</font><br>
1402 <br>
1403 For a range of elevators, you would use something like:<br>
1404 <font face="Courier New, Courier, mono" size="2">&lt;Elevators 2 to
1405 10&gt;</font><br>
1406 and end with:<br>
1407 <font face="Courier New, Courier, mono" size="2">&lt;EndElevators&gt;</font></p>
1408
1409 <p align="left"><strong>Variables:</strong></p>
1410
1411 <p align="left"><font face="Courier New, Courier, mono"
1412 size="2"><strong>%elevator%</strong></font> - number of the current elevator</p>
1413
1414 <p align="left"><strong>Parameters</strong>:</p>
1415
1416 <p align="left"><strong>1. Name</strong> - sets the name of the elevator<br>
1417 Example: <font face="Courier New, Courier, mono" size="2">Name = Service
1418 Elevator</font></p>
1419
1420 <p align="left"><strong>2. Speed</strong> - maximum speed of the elevator, in
1421 feet per second<br>
1422 Example: <font face="Courier New, Courier, mono" size="2">Speed = 20</font></p>
1423
1424 <p align="left"><strong>3. Acceleration</strong> - acceleration speed of the
1425 elevator, in feet per second<br>
1426 Example: <font face="Courier New, Courier, mono" size="2">Acceleration =
1427 0.015</font></p>
1428
1429 <p align="left"><strong>4. Deceleration</strong> - deceleration speed of the
1430 elevator, in feet per second<br>
1431 Example: <font face="Courier New, Courier, mono" size="2">Deceleration =
1432 0.0075</font></p>
1433
1434 <p align="left"><strong>5. OpenSpeed</strong> - open/close speed of the
1435 elevator doors. This must be specified after the CreateElevator command.<br>
1436 Syntax: <font face="Courier New, Courier, mono" size="2">OpenSpeed
1437 <em>doornumber</em> = <em>value</em></font><br>
1438 Example: <font face="Courier New, Courier, mono" size="2">OpenSpeed 1 =
1439 0.2</font></p>
1440
1441 <p align="left"><strong>6. SlowSpeed</strong> - open/close speed multiplier of
1442 the elevator doors used for slow movement, usually nudge mode. The default is
1443 0.5, which ends up being half of the door's speed value. This must be specified
1444 after the CreateElevator command.<br>
1445 Syntax: <font face="Courier New, Courier, mono" size="2">SlowSpeed
1446 <em>doornumber</em> = <em>value</em></font><br>
1447 Example: <font face="Courier New, Courier, mono" size="2">SlowSpeed 1 =
1448 0.2</font></p>
1449
1450 <p align="left"><strong>7. ManualSpeed</strong> - open/close speed multiplier
1451 of the elevator doors used for manual movement. The default is 0.2. This must
1452 be specified after the CreateElevator command.<br>
1453 Syntax: <font face="Courier New, Courier, mono" size="2">ManualSpeed
1454 <em>doornumber</em> = <em>value</em></font><br>
1455 Example: <font face="Courier New, Courier, mono" size="2">ManualSpeed 1 =
1456 0.2</font></p>
1457
1458 <p align="left"><strong>8. ServicedFloors</strong> - a comma-separated list of
1459 floors this elevator services. Ranges can also be specified by putting a "-"
1460 between the numbers<br>
1461 Example: <font face="Courier New, Courier, mono" size="2">ServicedFloors = 0,
1462 5, 6, 7-30, 31</font></p>
1463
1464 <p align="left"><strong>9. AssignedShaft</strong> - the shaft number this
1465 elevator is in<br>
1466 Example: <font face="Courier New, Courier, mono" size="2">AssignedShaft =
1467 1</font></p>
1468
1469 <p align="left"><strong>10. DoorTimer</strong> - the length of time (in
1470 milliseconds) that the elevator doors should stay open before automatically
1471 closing. Specify 0 to disable. The default is 5000, or 5 seconds. This must be
1472 specified after the CreateElevator command.<br>
1473 Syntax: <font face="Courier New, Courier, mono" size="2">DoorTimer
1474 <em>doornumber</em> = <em>value</em></font><br>
1475 Example: <font face="Courier New, Courier, mono" size="2">DoorTimer 1 =
1476 10000</font></p>
1477
1478 <p align="left"><strong>11. QuickClose</strong> - the length of time (in
1479 milliseconds) that the elevator doors should stay open before automatically
1480 closing, in quick-close mode. Specify 0 to disable. The default is 3000, or 3
1481 seconds. This must be specified after the CreateElevator command.<br>
1482 Syntax: <font face="Courier New, Courier, mono" size="2">QuickClose
1483 <em>doornumber</em> = <em>value</em></font><br>
1484 Example: <font face="Courier New, Courier, mono" size="2">QuickClose 1 =
1485 10000</font></p>
1486
1487 <p align="left"><strong>12. NudgeTimer</strong> - the length of time (in
1488 seconds) that the doors have to remain open before the elevator activates nudge
1489 mode for the related door. Specify 0 to disable. The default is 30 seconds.
1490 This must be specified after the CreateElevator command.<br>
1491 Syntax: <font face="Courier New, Courier, mono" size="2">NudgeTimer
1492 <em>doornumber</em> = <em>value</em></font><br>
1493 Example: <font face="Courier New, Courier, mono" size="2">NudgeTimer 1 =
1494 10</font></p>
1495
1496 <p align="left"><strong>13. OpenSound</strong> - the sound file to play when
1497 the elevator doors open. Default is <em>elevatoropen.wav</em>. Leave the
1498 filename field blank for no sound. This must be specified after the
1499 CreateElevator command.<br>
1500 Syntax: <font face="Courier New, Courier, mono" size="2">OpenSound
1501 <em>doornumber</em> = <em>filename</em></font><br>
1502 Example: <font face="Courier New, Courier, mono" size="2">OpenSound 1 =
1503 open.wav</font></p>
1504
1505 <p align="left"><strong>14. CloseSound</strong> - the sound file to play when
1506 the elevator doors close. Default is <em>elevatorclose.wav</em>. Leave the
1507 filename field blank for no sound. This must be specified after the
1508 CreateElevator command.<br>
1509 Syntax: <font face="Courier New, Courier, mono" size="2">CloseSound
1510 <em>doornumber</em> = <em>filename</em></font><br>
1511 Example: <font face="Courier New, Courier, mono" size="2">CloseSound 1 =
1512 close.wav</font></p>
1513
1514 <p align="left"><strong>15. CarStartSound, CarUpStartSound,
1515 CarDownStartSound</strong> - the sound file to play when the elevator starts
1516 moving/speeds up. Leave the filename field blank for no sound. By default no
1517 sound is played. The first command specifies both up and down sounds, while the
1518 others are for either upwards movement or downwards movement.<br>
1519 Example: <font face="Courier New, Courier, mono" size="2">CarStartSound =
1520 start.wav</font></p>
1521
1522 <p align="left"><strong>16. CarMoveSound, CarUpMoveSound,
1523 CarDownMoveSound</strong> - the sound file to play while the elevator is
1524 moving. This file is automatically looped by the simulator. By default no sound
1525 is played. Leave the filename field blank for no sound. The first command
1526 specifies both up and down sounds, while the others are for either upwards
1527 movement or downwards movement.<br>
1528 Example: <font face="Courier New, Courier, mono" size="2">CarMoveSound =
1529 move.wav</font></p>
1530
1531 <p align="left"><strong>17. CarStopSound, CarUpStopSound,
1532 CarDownStopSound</strong> - the sound file to play when the elevator slows down
1533 and stops. By default no sound is played. Leave the filename field blank for no
1534 sound. The first command specifies both up and down sounds, while the others
1535 are for either upwards movement or downwards movement.<br>
1536 Example: <font face="Courier New, Courier, mono" size="2">CarStopSound =
1537 stop.wav</font></p>
1538
1539 <p align="left"><strong>18. CarIdleSound</strong> - the sound file to play when
1540 the elevator is idle (generally the fan sound). Default is
1541 <em>elevidle.wav</em>. Leave the filename field blank for no sound. <br>
1542 Example: <font face="Courier New, Courier, mono" size="2">CarIdleSound =
1543 idle.wav</font></p>
1544
1545 <p align="left"><strong>19. MotorStartSound, MotorUpStartSound,
1546 MotorDownStartSound</strong> - the sound file to play when the elevator motor
1547 starts moving/speeds up (sets both directions). Default is
1548 <em>elevstart.wav</em>. Leave the filename field blank for no sound. The first
1549 command specifies both up and down sounds, while the others are for either
1550 upwards movement or downwards movement.<br>
1551 Example: <font face="Courier New, Courier, mono" size="2">MotorStartSound =
1552 start.wav</font></p>
1553
1554 <p align="left"><strong>20. MotorRunSound, MotorUpRunSound,
1555 MotorDownRunSound</strong> - the sound file to play while the elevator motor is
1556 running (sets both directions). This file is automatically looped by the
1557 simulator. Default is <em>elevmove.wav</em>. Leave the filename field blank for
1558 no sound. The first command specifies both up and down sounds, while the others
1559 are for either upwards movement or downwards movement.<br>
1560 Example: <font face="Courier New, Courier, mono" size="2">MotorRunSound =
1561 run.wav</font></p>
1562
1563 <p align="left"><strong>21. MotorStopSound, MotorUpStopSound,
1564 MotorDownStopSound</strong> - the sound file to play when the elevator motor
1565 slows down and stops (sets both directions). Default is <em>elevstop.wav</em>.
1566 Leave the filename field blank for no sound. The first command specifies both
1567 up and down sounds, while the others are for either upwards movement or
1568 downwards movement.<br>
1569 Example: <font face="Courier New, Courier, mono" size="2">MotorStopSound =
1570 stop.wav</font></p>
1571
1572 <p align="left"><strong>22. MotorIdleSound</strong> - the sound file to play
1573 when the elevator motor is idling. There is no default yet. Leave the filename
1574 field blank for no sound. <br>
1575 Example: <font face="Courier New, Courier, mono" size="2">MotorIdleSound =
1576 idle.wav</font></p>
1577
1578 <p align="left"><strong>23. ChimeSound</strong> - the sound file to play when
1579 the elevator arrives at a floor. Default is <em>chime1.wav</em>. This must be
1580 specified after the CreateElevator command. This is used for both up and down
1581 chimes. Leave the filename field blank for no sound. <br>
1582 Syntax: <font face="Courier New, Courier, mono" size="2">ChimeSound
1583 <em>doornumber</em> = <em>filename</em></font><br>
1584 Example: <font face="Courier New, Courier, mono" size="2">ChimeSound 1 =
1585 chime.wav</font></p>
1586
1587 <p align="left"><strong>24. UpChimeSound</strong> - the sound file to play when
1588 the elevator arrives at a floor and it's direction is up. Default is
1589 <em>chime1.wav</em>. Leave the filename field blank for no sound. This must be
1590 specified after the CreateElevator command.<br>
1591 Syntax: <font face="Courier New, Courier, mono" size="2">UpChimeSound
1592 <em>doornumber</em> = <em>filename</em></font><br>
1593 Example: <font face="Courier New, Courier, mono" size="2">UpChimeSound 1 =
1594 chime.wav</font></p>
1595
1596 <p align="left"><strong>25. DownChimeSound</strong> - the sound file to play
1597 when the elevator arrives at a floor and it's direction is down. Default is
1598 <em>chime1.wav</em>. Leave the filename field blank for no sound. This must be
1599 specified after the CreateElevator command.<br>
1600 Syntax: <font face="Courier New, Courier, mono" size="2">DownChimeSound
1601 <em>doornumber</em> = <em>filename</em></font><br>
1602 Example: <font face="Courier New, Courier, mono" size="2">DownChimeSound 1 =
1603 chime.wav</font></p>
1604
1605 <p align="left"><strong>26. AlarmSound</strong> - the sound file to play when
1606 the elevator alarm button is pressed. Default is <em>bell1.wav</em>. Leave the
1607 filename field blank for no sound. <br>
1608 Example: <font face="Courier New, Courier, mono" size="2">AlarmSound =
1609 bell2.wav</font></p>
1610
1611 <p align="left"><strong>27. AlarmSoundStop</strong> - the sound file to play
1612 when the elevator alarm button is released. Leave the filename field blank for
1613 no sound. Default is <em>bell1-stop.wav</em>.<br>
1614 Example: <font face="Courier New, Courier, mono" size="2">AlarmSoundStop =
1615 bell2-stop.wav</font></p>
1616
1617 <p align="left"><strong>28. BeepSound</strong> - the sound file to play when
1618 the elevator reaches a new floor. There is no default; if this is set, the
1619 beeps will be automatically enabled. If an asterisk (*) is specified, it is
1620 replaced with the current floor number.<br>
1621 Example: <font face="Courier New, Courier, mono" size="2">BeepSound =
1622 beep.wav</font></p>
1623
1624 <p align="left"><strong>29. FloorSound</strong> - the sound file(s) to play
1625 when the elevator arrives at a floor; normally this is used for files that
1626 speak the floor number. There is no default; if this is set, the sounds will be
1627 automatically enabled. If an asterisk (*) is specified, it is replaced with the
1628 current floor number.<br>
1629 Example: <font face="Courier New, Courier, mono" size="2">FloorSound =
1630 floor*.wav</font></p>
1631
1632 <p align="left"><strong>30. UpMessage</strong> - the notification sound file(s)
1633 to play after the elevator arrives at a floor and the doors open - this tells
1634 the passengers that the elevator is going up. There is no default; if this is
1635 set, the sound will be automatically enabled. If an asterisk (*) is specified,
1636 it is replaced with the current floor number.<br>
1637 Example: <font face="Courier New, Courier, mono" size="2">UpMessage =
1638 goingup.wav</font></p>
1639
1640 <p align="left"><strong>31. DownMessage</strong> - the notification sound
1641 file(s) to play after the elevator arrives at a floor and the doors open - this
1642 tells the passengers that the elevator is going down. There is no default; if
1643 this is set, the sound will be automatically enabled. If an asterisk (*) is
1644 specified, it is replaced with the current floor number.<br>
1645 Example: <font face="Courier New, Courier, mono" size="2">DownMessage =
1646 goingdown.wav</font></p>
1647
1648 <p align="left"><strong>32. OpenMessage</strong> - the notification sound
1649 file(s) to play when the elevator doors begin opening - this tells the
1650 passengers that the doors are opening. There is no default; if this is set, the
1651 sound will be automatically enabled. If an asterisk (*) is specified, it is
1652 replaced with the current floor number.<br>
1653 Example: <font face="Courier New, Courier, mono" size="2">OpenMessage =
1654 doorsopening.wav</font></p>
1655
1656 <p align="left"><strong>33. CloseMessage</strong> - the notification sound
1657 file(s) to play when the elevator doors begin closing - this tells the
1658 passengers that the doors are closing. There is no default; if this is set, the
1659 sound will be automatically enabled. If an asterisk (*) is specified, it is
1660 replaced with the current floor number.<br>
1661 Example: <font face="Courier New, Courier, mono" size="2">CloseMessage =
1662 doorsclosing.wav</font></p>
1663
1664 <p align="left"><strong>34. Music</strong> - the sound file to play for the
1665 elevator music - the sound is automatically looped. There is no default; if
1666 this is set, the sound will be automatically enabled. <br>
1667 Example: <font face="Courier New, Courier, mono" size="2">Music =
1668 musicfile.wav</font></p>
1669
1670 <p align="left"><strong>35. NudgeSound</strong> - the sound file to play while
1671 in nudge mode. Default is <em>buzz.wav</em>. Leave the filename field blank for
1672 no sound. This must be specified after the CreateElevator command.<br>
1673 Syntax: <font face="Courier New, Courier, mono" size="2">NudgeSound
1674 <em>doornumber</em> = <em>filename</em></font><br>
1675 Example: <font face="Courier New, Courier, mono" size="2">NudgeSound 1 =
1676 buzz.wav</font></p>
1677
1678 <p align="left"><strong>36. FloorSkipText</strong> - sets the text that will be
1679 shown in the floor indicator when passing non-serviced floors. The texture for
1680 this must be loaded for it to show (and will start with the related indicator's
1681 texture prefix) - of you set this to EX for example, and the indicator's
1682 texture prefix is "Button", the texture it'll load will be ButtonEX.jpg. Common
1683 values for this are EZ, X, and EX (which stand for Express Zone).<br>
1684 Example: <font face="Courier New, Courier, mono" size="2">FloorSkipText = EZ
1685 </font></p>
1686
1687 <p align="left"><strong>37. RecallFloor</strong> - sets the floor the elevator
1688 will recall to during fire service phase 1 mode. Default is the lowest serviced
1689 floor. <br>
1690 Example: <font face="Courier New, Courier, mono" size="2">RecallFloor =
1691 5</font></p>
1692
1693 <p align="left"><strong>38. AlternateRecallFloor</strong> - sets the alternate
1694 floor the elevator will recall to during fire service phase 1 mode. Default is
1695 the highest serviced floor. <br>
1696 Example: <font face="Courier New, Courier, mono" size="2">AlternateRecallFloor
1697 = 6</font></p>
1698
1699 <p align="left"><strong>39. ACP</strong> - enables ACP (Anti-Crime Protection)
1700 mode<br>
1701 Example: <font face="Courier New, Courier, mono" size="2">ACP = true</font></p>
1702
1703 <p align="left"><strong>40. ACPFloor</strong> - sets the floor the elevator
1704 will stop at while in ACP mode. Default is the lowest serviced floor. <br>
1705 Example: <font face="Courier New, Courier, mono" size="2">ACPFloor =
1706 5</font></p>
1707
1708 <p align="left"><strong>41. Doors</strong> - sets the number of doors the
1709 elevator will have. The default is 1. Set to 0 in order to have a doorless
1710 elevator.<br>
1711 Example: <font face="Courier New, Courier, mono" size="2">Doors = 2</font></p>
1712
1713 <p align="left"><strong>42. MotorPosition</strong> - sets the position of the
1714 motor sound emitter; if this command is not specified, it'll be placed at the
1715 base (altitude + interfloor) of the highest floor in the corresponding shaft.
1716 The X and Z values are relative of the elevator center.<br>
1717 Syntax: <font face="Courier New, Courier, mono" size="2">MotorPosition = <em>x,
1718 y, z</em><br>
1719 </font>Example: <font face="Courier New, Courier, mono" size="2">MotorPosition
1720 = 0, 100, 0</font></p>
1721
1722 <p align="left"><strong>43. QueueResets</strong> - set this to true if you want
1723 the elevator to reset the related queue (up or down) after it reaches the last
1724 valid entry. If the elevator is moving up for example with this setting on, and
1725 you press buttons for floors below you, the elevator will remove those entries
1726 after it reaches the highest selected floor. The elevator will only be
1727 available for hall calls in the active queue direction.<br>
1728 Example: <font face="Courier New, Courier, mono" size="2">QueueResets =
1729 true</font></p>
1730
1731 <p align="left"><strong>44. LimitQueue</strong> - set this to true to only
1732 allow floor selections in the same direction as the active elevator queue
1733 direction to be placed. For example, if the elevator is moving up, and a button
1734 is pressed for a lower floor, this will prevent that from being queued. The
1735 elevator will only be available for hall calls in the active queue
1736 direction.<br>
1737 Example: <font face="Courier New, Courier, mono" size="2">LimitQueue =
1738 true</font></p>
1739
1740 <p align="left"><strong>45. UpPeak</strong> - enables up peak mode for this
1741 elevator.<br>
1742 Example: <font face="Courier New, Courier, mono" size="2">UpPeak =
1743 true</font></p>
1744
1745 <p align="left"><strong>46. DownPeak</strong> - enables down peak mode for this
1746 elevator.<br>
1747 Example: <font face="Courier New, Courier, mono" size="2">DownPeak =
1748 true</font></p>
1749
1750 <p align="left"><strong>47. IndependentService</strong> - enables independent
1751 service mode for this elevator.<br>
1752 Example: <font face="Courier New, Courier, mono" size="2">IndependentService =
1753 true</font></p>
1754
1755 <p align="left"><strong>48. InspectionService</strong> - enables inspection
1756 service mode for this elevator.<br>
1757 Example: <font face="Courier New, Courier, mono" size="2">InspectionService =
1758 true</font></p>
1759
1760 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>49.
1761 InspectionSpeed</strong> - speed multiplier for inspection service (if set to
1762 0.6, would be 60% of elevator speed)<br>
1763 Syntax: <font face="Courier New, Courier, mono" size="2">InspectionSpeed =
1764 <em>multiplier</em></font></p>
1765
1766 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>50.
1767 Parking</strong> - enables automatic elevator parking. If this option is used,
1768 the elevator will automatically send itself to the specified parking floor
1769 after the number of seconds specified in <em>delay</em>. <br>
1770 Syntax: <font face="Courier New, Courier, mono" size="2">Parking = <em>floor,
1771 delay</em></font></p>
1772
1773 <p align="left"><strong>51. LevelingSpeed</strong> - elevator's leveling speed.
1774 Default is 0.2<br>
1775 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingSpeed =
1776 <em>speed</em></font></p>
1777
1778 <p align="left"><strong>52. LevelingOffset</strong> - distance in feet from the
1779 destination floor that the elevator will switch into leveling mode. Default is
1780 0.5<br>
1781 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingOffset =
1782 <em>distance</em></font></p>
1783
1784 <p align="left"><strong>53. LevelingOpen</strong> - distance in feet from the
1785 destination floor that the elevator will open the doors. Default is 0.<br>
1786 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingOpen =
1787 <em>distance</em></font></p>
1788
1789 <p align="left"><strong>54. NotifyEarly</strong> - changes behavior of arrival
1790 notifications (chime, lighting of directional indicator, and floor announcement
1791 sound). 0 is the default and notifies when the elevator stops on the floor. 1
1792 notifies when the elevator starts the leveling process, and 2 notifies when the
1793 elevator starts decelerating.<br>
1794 Syntax: <font face="Courier New, Courier, mono" size="2">NotifyEarly =
1795 <em>value</em></font></p>
1796
1797 <p align="left"><strong>55. MusicPosition</strong> - sets the position of the
1798 music sound emitter relative of the elevator's position. If this command is not
1799 specified, it'll be placed in the center of the elevator on the ceiling.<br>
1800 Syntax: <font face="Courier New, Courier, mono" size="2">MusicPosition = <em>x,
1801 y, z</em><br>
1802 </font>Example: <font face="Courier New, Courier, mono" size="2">MusicPosition
1803 = 0, 8, 0</font></p>
1804
1805 <p align="left"><strong>56. DepartureDelay</strong> - sets the time in seconds
1806 that the elevator waits before proceeding to the next floor. Default is 0.<br>
1807 Syntax: <font face="Courier New, Courier, mono" size="2">DepartureDelay =
1808 <em>1</em> </font></p>
1809
1810 <p align="left"><strong>57. ArrivalDelay</strong> - sets the time in seconds
1811 that the elevator waits before opening the doors after arriving at a floor. The
1812 default is 0. Note that a value greater than 0 will switch off the LevelingOpen
1813 setting.<br>
1814 Syntax: <font face="Courier New, Courier, mono" size="2">ArrivalDelay =
1815 <em>0.5</em></font></p>
1816
1817 <p align="left"><strong>58. DisplayFloors</strong> - sets the floors that will
1818 be displayed by the elevator's indicators. This command uses the same syntax as
1819 the ServicedFloors command.<br>
1820 Syntax: <font face="Courier New, Courier, mono" size="2">DisplayFloors = <em>0,
1821 9, 19, 29</em></font></p>
1822
1823 <p align="left"><strong>59. FireService1</strong> - sets the fire service phase
1824 1 mode that the elevator will start with. Default is 0. Values are 0 for off, 1
1825 for on, 2 for bypass.<br>
1826 Syntax: <font face="Courier New, Courier, mono" size="2">FireService1 =
1827 2</font></p>
1828
1829 <p align="left"><strong>60. FireService2</strong> - sets the fire service phase
1830 2 mode that the elevator will start with. Default is 0. Values are 0 for off, 1
1831 for on, 2 for hold.<br>
1832 Syntax: <font face="Courier New, Courier, mono" size="2">FireService2 =
1833 1</font></p>
1834
1835 <p align="left"><strong>61. MusicOn</strong> - Enables or disables music on
1836 start. Default is true.<br>
1837 Syntax: <font face="Courier New, Courier, mono" size="2">MusicOn =
1838 false</font></p>
1839
1840 <p align="left"><strong>62. MusicOnMove</strong> - Determines if music should
1841 only be played while elevator is moving or not. Default is false.<br>
1842 Syntax: <font face="Courier New, Courier, mono" size="2">MusicOnMove =
1843 true</font></p>
1844
1845 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>63.
1846 AutoEnable</strong> - Determines if interior objects should automatically be
1847 enabled or disabled when the user enters/exits the elevator (set to false for
1848 glass elevators).<br>
1849 Syntax: <font face="Courier New, Courier, mono" size="2">AutoEnable =
1850 false</font></p>
1851
1852 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>64.
1853 ReOpen</strong> - if this is set to true, if the elevator is idle, the doors
1854 will reopen if the same floor is selected. The default is true.<br>
1855 Syntax: <font face="Courier New, Courier, mono" size="2">ReOpen =
1856 false</font></p>
1857
1858 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>65.
1859 AutoDoors</strong> - if this is set to true, the elevator doors will
1860 automatically open if instructed (for example, when arriving at a floor), and
1861 will refuse to open if between floors. Set to false for manual elevators. The
1862 default is true.<br>
1863 Syntax: <font face="Courier New, Courier, mono" size="2">AutoDoors =
1864 false</font></p>
1865
1866 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>66.
1867 OpenOnStart</strong> - if this is set to true, the elevator doors will
1868 automatically open on startup. The default is false.<br>
1869 Syntax: <font face="Courier New, Courier, mono" size="2">OpenOnStart =
1870 false</font></p>
1871
1872 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>67.
1873 Interlocks</strong> - if this is set to true, the elevator doors will remain
1874 locked while the elevator is moving, will refuse to open unless the elevator is
1875 within a landing zone, and the elevator will not move unless the doors are
1876 closed. The default is true.<br>
1877 Syntax: <font face="Courier New, Courier, mono" size="2">Interlocks =
1878 false</font></p>
1879
1880 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>68.
1881 FloorHold</strong> - if this is set to true, the user must hold down the floor
1882 button in order to move to the desired floor. When the button is released, the
1883 elevator will immediately stop. This is used to mimic a modern manual elevator
1884 (platform lift). The default is false.<br>
1885 Syntax: <font face="Courier New, Courier, mono" size="2">FloorHold =
1886 true</font></p>
1887
1888 <p align="left"><strong>69. DoorSensor</strong> - enable or disable the door
1889 sensor (electric eye), which is a trigger object placed in the elevator door
1890 area. Default is enabled for automatic doors. A second parameter specifies the
1891 sound file to play when switching between on and off - this is normally used
1892 for a relay switch sound effect. Only specify the first parameter for no sound.
1893 This must be specified after the CreateElevator command.<br>
1894 Syntax: <font face="Courier New, Courier, mono" size="2">DoorSensor
1895 <em>doornumber</em> = <em>enable[, filename]</em></font><br>
1896 Example: <font face="Courier New, Courier, mono" size="2">DoorSensor 1 = true,
1897 click.wav</font><br>
1898 <br>
1899 To have the sensor play a continuous beep while it's on (obstructed), create a
1900 sound inside the elevator with the AddSound command using the filename of the
1901 beep sound you want, and then create an action with the elevator's "sensor"
1902 command name. So for elevator 1, you would create an action named "Elevator
1903 1:sensor", and the action would do a "playsound" command on the sound you
1904 created.<br>
1905 </p>
1906
1907 <p align="left"><strong>70. CarEmergencyStopSound</strong> - the sound file to play
1908 for the elevator car when an emergency stop is initiated.
1909 Leave the filename field blank to use the normal car stop sound, if specified.
1910 By default no sound is played.<br>
1911 Example: <font face="Courier New, Courier, mono" size="2">CarEmergencyStopSound =
1912 emergstop_car.wav</font></p>
1913
1914 <p align="left"><strong>71. MotorEmergencyStopSound</strong> - the sound file to play
1915 for the elevator motor when an emergency stop is initiated.
1916 Leave the filename field blank to use the normal motor stop sound, if specified.
1917 The default is <em>emergstop.wav</em><br>
1918 Example: <font face="Courier New, Courier, mono" size="2">MotorEmergencyStopSound =
1919 emergstop.wav</font></p>
1920
1921 <p align="left"><strong>72. EmergencyStopSpeed</strong> - the speed multiplier to
1922 use for an emergency stop.  A value of 3, the default, would mean 3 times the
1923 normal deceleration rate.<br>
1924 Example: <font face="Courier New, Courier, mono" size="2">EmergencyStopSpeed =
1925 2.5</font></p>
1926
1927 <p></p>
1928 <br>
1929
1930 <p align="left"><strong>Commands:</strong></p>
1931
1932 <p align="left"><strong>1. CreateElevator</strong> - creates an elevator at the
1933 specified location<br>
1934 Syntax: <font face="Courier New, Courier, mono" size="2">CreateElevator
1935 <em>relative, x</em>, <em>z</em>, <em>floor<br>
1936 </em></font>Example:<font face="Courier New, Courier, mono" size="2"><em></em>
1937 CreateElevator false, 0, 10, 0</font></p>
1938
1939 <p align="left"><em>Relative </em>determines if the coordinates are relative to
1940 the shaft center, or if they're absolute, <em>X</em> and <em>Z </em>are the
1941 coordinates to place the center of the elevator at, and <em>Floor</em> is the
1942 floor to place the elevator on.</p>
1943
1944 <p align="left"><strong>2. AddFloor</strong> - adds a textured floor with the
1945 specified dimensions for the elevator<br>
1946 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloor <em>name,
1947 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
1948 <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis, texture_direction,
1949 tw</em>, <em>th</em></font><br>
1950 Example: <font face="Courier New, Courier, mono" size="2">AddFloor Floor1,
1951 Wood2, 0.5, -3.5, -3, 3.5, 3, 0, 0, false, false, 0, 0</font></p>
1952
1953 <p align="left"><strong>3. AddWall</strong> - adds a textured wall for the
1954 elevator<br>
1955 Syntax: <font face="Courier New, Courier, mono" size="2">AddWall <em>name,
1956 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>, z2,
1957 <em>height1</em>, <em>height2</em>, <em>voffset1</em>, <em>voffset2,
1958 </em><em>tw</em>, <em>th</em></font><br>
1959 Example: <font face="Courier New, Courier, mono" size="2">AddWall Wall1, Wood1,
1960 0.5, -3.5, 3, 3.5, 3, 8, 8, 0, 0, 2, 2</font></p>
1961
1962 <p align="left">The elevator's AddWall command is similar to the other AddWall
1963 commands.</p>
1964
1965 <p align="left"><strong>4. AddDoors</strong> - creates elevator doors<br>
1966 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoors <em>number,
1967 lefttexture, righttexture</em>, <em>thickness, CenterX, CenterZ, width, height,
1968 direction, tw, th</em></font></p>
1969
1970 <p align="left">The AddDoors command creates working elevator doors at the
1971 central location specified by <em>CenterX</em> and <em>CenterZ</em>, with
1972 <em>width</em> and <em>height</em> specifiying the width and height of each
1973 door, and <em>Direction</em> specifying the direction that the doors face
1974 (currently there are only 2: <em>false</em> if the doors are on the left or
1975 right sides, and <em>true</em> if the doors are on the front or back sides).
1976 <em>Number</em> specifies the number of the door to create (related to the
1977 <em>Doors</em> command) - if the elevator only has one door, or if the Doors
1978 command was not used, specify 1 here.</p>
1979
1980 <p align="left"><strong>5. AddShaftDoors</strong> - creates shaft elevator
1981 doors<br>
1982 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoors
1983 <em>number, lefttexture, righttexture</em>, <em>thickness, CenterX, CenterZ,
1984 voffset, tw, th</em></font></p>
1985
1986 <p align="left">The AddShaftDoors command creates working shaft elevator doors
1987 at the central location specified by <em>CenterX</em> and <em>CenterZ</em>.
1988 Other parameters such as width, height, and direction are taken from the
1989 AddDoors command (so the regular elevator doors need to be created first). The
1990 <em>voffset</em> parameter allows you to create shaft doors at a different
1991 vertical position than the base of the floor, and the elevator will
1992 automatically stop according to the shaft door's voffset for that floor. These
1993 doors should be moved slightly away from the elevator doors (to separate them
1994 both). Also, this command creates doors at all the floors specified in the
1995 ServicedFloors value, and cuts any shaft walls that are within the door area
1996 (and so this must be called after the shaft walls are created). <em>Number</em>
1997 specifies the number of the door to create (related to the <em>Doors</em>
1998 command) - if the elevator only has one door, or if the Doors command was not
1999 used, specify 1 here.</p>
2000
2001 <p align="left"><strong>6. CreatePanel</strong> - creates a button panel<br>
2002 Syntax: <font face="Courier New, Courier, mono" size="2">CreatePanel
2003 <em>texturename</em>, <em>rows, columns, direction, CenterX, CenterZ,
2004 buttonwidth, buttonheight, spacingX, spacingY, voffset, tw, th<br>
2005 </em></font> Example<font face="Courier New, Courier, mono" size="2"><em>:
2006 </em><font face="Courier New, Courier, mono" size="2">CreatePanel Wall1, 5, 5,
2007 right, -3, -3, 0.15, 0.15, 0.3, 0.45, 4.5, 0, 0</font></font></p>
2008
2009 <p align="left">The CreatePanel command creates a button panel at a position
2010 relative to the elevator's center position (origin). <em>Rows</em> and
2011 <em>Columns</em> define the grid size of the panel. <em>Direction</em> is
2012 either "front", "back", "left" or "right", defining which direction the panel
2013 faces. <em>SpacingX</em> is the space (percent of a button's width)
2014 horizontally between each button, and <em>spacingY</em> is the space (percent
2015 of a button's height) vertically between each button. Not all positions need to
2016 be used; this is simply to provide a grid layout for the panel. This command
2017 also determines the width and height of the panel based on the spacing and
2018 button sizes. A simple formula for determining panel width or height is this -
2019 for width, it's (columns * buttonwidth) + (spacingX * (columns + 1)); for
2020 height, just swap columns with rows and spacingX with spacingY.</p>
2021
2022 <p align="left"><strong>7. AddButton</strong> - creates a standard button on
2023 the panel<br>
2024 Syntax: <font face="Courier New, Courier, mono" size="2">AddButton
2025 <em>panel_number, sound, texture_unlit</em>, <em>texture_lit, row, column,
2026 floor/type, width, height[, hoffset, voffset]</em></font><br>
2027 Example 1: <font face="Courier New, Courier, mono" size="2">AddButton 1,
2028 switch.wav, Button5, ButtonLit5, 7, 3, 4, 1, 1</font><br>
2029 Example 2: <font face="Courier New, Courier, mono" size="2">AddButton 1, ,
2030 Button5, ButtonLit5, 7, 3, 4, 1, 1, 0.1, -0.1</font></p>
2031
2032 <p align="left">The AddButton command creates a button on the button panel
2033 created with CreatePanel. <em>Panel_number</em> specifies the number of the
2034 panel to add the button to. <em>Row</em> and <em>Column</em> specify the
2035 position on the grid where the button should be. <em>Floor/Type</em> specifies
2036 either the floor number that this button calls, or the action name such as
2037 "Open" (see the AddControl command for more info). <em>Width</em> and
2038 <em>Height</em> specify the width and height of the button, as a percentage of
2039 a single grid unit size (1 being 100%, 0.5 being 50%). If both values are 0,
2040 the default of 1 is used for both values. If only one of the values is 0, then
2041 the exact size other is used; for example, if <em>width</em> is 0 and
2042 <em>height</em> is 1 (or any other number), then the width will end up being
2043 the same size as the height. <em>Hoffset</em> and <em>Voffset</em> are optional
2044 parameters, and are used to position the button outside the normal grid, and
2045 are in grid units (buttonwidth and buttonheight parameters of the CreatePanel
2046 function). In the second example, the button is positioned 0.1 grid units to
2047 the right, and 0.1 grid units down. Notice that no sound is specified in the
2048 2nd example - this means that a sound won't be played.</p>
2049
2050 <p align="left"><strong>8. AddControl</strong> - advanced command for creating
2051 buttons, switches and knobs on the panel<br>
2052 Syntax: <font face="Courier New, Courier, mono" size="2">AddControl
2053 <em>panel_number, sound, row, column, width, height, hoffset, voffset,
2054 command_name(s), texture_name(s)<br>
2055 </em></font>Example 1: <font face="Courier New, Courier, mono"
2056 size="2">AddControl 1, switch.wav, 7, 3, 1, 1, 0, 0, open, ButtonOpen</font><br>
2057 Example 2: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2058 switch.wav, 7, 3, 1, 1, 0, 0, FanOff, FanOn, SwitchFanOff,
2059 SwitchFanOn</font><br>
2060 Example 3: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2061 switch.wav, 7, 3, 1, 1, 0, 0, Off, 4, Button5, ButtonLit5</font><br>
2062 Example 4: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2063 switch.wav, 7, 3, 1, 1, 0, 0, Fire2Off, Fire2On, Fire2Hold, FireKnob1,
2064 FireKnob2, FireKnob3</font></p>
2065
2066 <p align="left">The AddControl command creates an advanced control on the
2067 specified button panel (created with CreatePanel). Most of the parameters are
2068 the same as the AddButton command, but the <em>command_name(s)</em> and
2069 <em>texture_name(s)</em> parameters allow you to specify a list of commands,
2070 and a list of textures to go along with those commands. A texture needs to be
2071 specified for every command; if you specify 3 commands and only 2 textures, you
2072 will get an error. The first example shows a door open button being created,
2073 with the command "open" and the texture "ButtonOpen". The 2nd example shows a
2074 fan switch being created, with the first command being "FanOff" with the
2075 "SwitchFanOff" texture being used for that, and "FanOn" for the second command
2076 with the "SwitchFanOn" texture being used for that. Example 3 shows a standard
2077 floor button being created (which is what the AddButton command does) and
2078 example 4 shows a fire service mode knob being created with 3 positions. Leave
2079 the sound field blank for no sound to be played.</p>
2080
2081 <p align="left">Available command names for elevators:</p>
2082
2083 <p align="left"><em>Off</em> (no action)<br>
2084 [floor number]<br>
2085 <em>Open</em> (open doors)<br>
2086 <em>Close</em> (close doors)<br>
2087 <em>OpenInt</em> (open interior/car doors)<br>
2088 <em>CloseInt</em> (close interior/car doors)<br>
2089 <em>OpenExt</em> (open exterior/shaft doors)<br>
2090 <em>CloseExt</em> (close exterior/shaft doors)<br>
2091 <em>OpenManual</em> (open doors manually)<br>
2092 <em>CloseManual</em> (close doors manually)<br>
2093 <em>OpenIntManual</em> (open interior/car doors manually)<br>
2094 <em>CloseIntManual</em> (close interior/car doors manually)<br>
2095 <em>Cancel</em> (call cancel)<br>
2096 <em>Run</em> (put elevator in run state)<br>
2097 <em>Stop</em> (put elevator in stop state)<br>
2098 <em>EStop</em> (emergency stop)<br>
2099 <em>Alarm</em><br>
2100 <em>Fire1Off</em> (fire service phase 1 off for all elevators in same bank,
2101 which means all served by first call button on recall floor)<br>
2102 <em>Fire1On</em> (fire service phase 1 on for all elevators in same bank)<br>
2103 <em>Fire1Bypass</em> (fire service phase 1 bypass for all elevators in same
2104 bank)<br>
2105 <em>Fire2Off</em> (fire service phase 2 off)<br>
2106 <em>Fire2On</em> (fire service phase 2 on)<br>
2107 <em>Fire2Hold</em> (fire service phase 2 hold)<br>
2108 <em>UpPeakOn</em> (enable up peak)<br>
2109 <em>UpPeakOff</em> (disable up peak)<br>
2110 <em>DownPeakOn</em> (enable down peak)<br>
2111 <em>DownPeakOff</em> (disable down peak)<br>
2112 <em>IndOn</em> (enable independent service mode)<br>
2113 <em>IndOff</em> (disable independent service)<br>
2114 <em>InsOn</em> (enable inspection service mode)<br>
2115 <em>InsOff</em> (disable inspection service)<br>
2116 <em>AcpOn</em> (enable ACP mode)<br>
2117 <em>AcpOff</em> (disable ACP mode)<br>
2118 <em>FanOn</em> (enable fan/idle sound)<br>
2119 <em>FanOff</em> (disable fan/idle sound)<br>
2120 <em>Hold</em> (hold door)<br>
2121 <em>MusicOn</em><br>
2122 <em>MusicOff</em><br>
2123 <em>UpOn</em> (inspection mode up on)<br>
2124 <em>UpOff</em> (inspection mode up off)<br>
2125 <em>DownOn</em> (inspection mode down on)<br>
2126 <em>DownOff</em> (inspection mode down off)<br>
2127 <em>GoOn</em> (inspection mode go on)<br>
2128 <em>GoOff</em> (inspection mode go off)<br>
2129 <em>Return</em> (return to nearest serviced floor after stop)<br>
2130 <em>Up</em> (move up for manual elevator)<br>
2131 <em>Down</em> (move down for manual elevator)<br>
2132 <em>InterlocksOn</em> (enable interlocks)<br>
2133 <em>InterlocksOff</em> (disable interlocks)<br>
2134 <em>Sensor</em> (open and hold doors, used by door sensor)<br>
2135 <em>Reset</em> (reset door timer which turns off hold, also used by door
2136 sensor)</p>
2137
2138 <p align="left">In the above list, <em>Open</em>, <em>Close</em>, related
2139 commands such as <em>OpenInt</em> and <em>OpenManual</em>, <em>Hold</em>,
2140 <em>Sensor</em>, and <em>Reset</em> can have the door number after the name -
2141 for example, <em>Open2</em> will open door 2, while <em>Open</em> will open all
2142 doors.<br>
2143 <br>
2144 When this command is used, actions are created using the specified commands.
2145 The resulting names of the actions are the elevator name, followed by a colon
2146 and the command name, in order to be unique to each elevator. So the "Open"
2147 command for Elevator 1 is created as an action named "Elevator 1:open", and you
2148 can specify more actions with that name to run multiple actions when the
2149 elevator opens it's doors.<br>
2150 <br>
2151 <strong>9. AddFloorIndicator</strong> - creates a floor indicator<br>
2152 Syntax: <font face="Courier New, Courier, mono"
2153 size="2">AddFloorIndicator<em> texture_prefix, direction, CenterX, CenterZ,
2154 width, height, voffset</em></font> </p>
2155
2156 <p align="left">The AddFloorIndicator command creates a floor indicator at the
2157 position (relative to the elevator) specified by <em>CenterX</em> and
2158 <em>CenterZ</em>. <em>Direction</em> is the direction the indicator faces, and
2159 can be either "left", "right", "front" or "back". This command can be given
2160 multiple times to create multiple indicators. <em>Texture_prefix</em> is the
2161 base name of the texture to load when displaying a floor ID; for example if the
2162 elevator is on floor 3, and you specify a prefix of "Button", it'll load the
2163 "Button3" texture.</p>
2164
2165 <p align="left"><strong>10. AddDirectionalIndicator</strong> - creates an
2166 internal directional indicator/lantern<br>
2167 Syntax: <font face="Courier New, Courier, mono"
2168 size="2">AddDirectionalIndicator<em> ActiveDirection, Single, Vertical,
2169 BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit, DownTexture,
2170 DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight,
2171 ShowBack, tw, th<br>
2172 </em></font>Example: <font face="Courier New, Courier, mono"
2173 size="2"><em>AddDirectionalIndicator false, false, true, Metal, UpLight,
2174 UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true, 0,
2175 0</em></font></p>
2176
2177 <p align="left">This command will create a directional indicator inside the
2178 elevator, and the positioning is relative of the elevator's center.</p>
2179
2180 <p align="left"><em>ActiveDirection</em> determines if the indicator should
2181 continuously display the active elevator direction (true), or if it should show
2182 the elevator's direction for the current call (false, default)</p>
2183
2184 <p align="left"><em>Single</em> determines if a single indicator light should
2185 be created instead of two. If this is true, the unlit texture is specified in
2186 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
2187
2188 <p align="left"><em>Vertical</em> determines if the two lights should be
2189 vertically separated (true), or horizontally separated (false)</p>
2190
2191 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
2192 the lights</p>
2193
2194 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
2195 used for the lights themselves, and the "Lit" texures are the ones to show when
2196 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
2197
2198 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
2199 of the indicators</p>
2200
2201 <p align="left"><em>voffset</em> is the altitude offset that the object is
2202 above each floor</p>
2203
2204 <p align="left"><em>direction </em>determines the direction the indicators
2205 face:<br>
2206 'front' means they face towards the front of the building<br>
2207 'back' means they face towards the back of the building<br>
2208 'left' means they face left<br>
2209 'right' means they face right</p>
2210
2211 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
2212 height of the wall plate</p>
2213
2214 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
2215 and is either true or false</p>
2216
2217 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
2218 wall plate.</p>
2219
2220 <p align="left"><strong></strong><strong>11. AddDirectionalIndicators</strong>
2221 - creates the elevator's exterior directional indicator/lanterns (similar to
2222 the CreateCallButtons command) <br>
2223 Syntax: <font face="Courier New, Courier, mono"
2224 size="2">AddDirectionalIndicators<em> Relative, ActiveDirection, Single,
2225 Vertical, BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit, DownTexture,
2226 DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight,
2227 ShowBack, tw, th<br>
2228 </em></font>Example:<font face="Courier New, Courier, mono"
2229 size="2"><em> AddDirectionalIndicators true, false, false, true, Metal,
2230 UpLight, UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true,
2231 0, 0</em></font></p>
2232
2233 <p align="left">This command will create directional indicators on all floors
2234 the elevator serves. It'll also automatically create the up and down lights
2235 depending on the floor. To create indicators on a per-floor basis, use the
2236 AddDirectionalIndicator command in the Floor section.</p>
2237
2238 <p align="left"><em>Relative</em> determines if the X and Z coordinates are
2239 relative to the elevator's origin (center) or not.</p>
2240
2241 <p align="left"><em>ActiveDirection</em> determines if the indicator should
2242 continuously display the active elevator direction (true), or if it should show
2243 the elevator's direction for the current call (false, default)</p>
2244
2245 <p align="left"><em>Single</em> determines if a single indicator light should
2246 be created instead of two. If this is true, the unlit texture is specified in
2247 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
2248
2249 <p align="left"><em>Vertical</em> determines if the two lights should be
2250 vertically separated (true), or horizontally separated (false)</p>
2251
2252 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
2253 the lights</p>
2254
2255 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
2256 used for the lights themselves, and the "Lit" texures are the ones to show when
2257 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
2258
2259 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
2260 of the indicators</p>
2261
2262 <p align="left"><em>voffset</em> is the altitude offset that the object is
2263 above each floor</p>
2264
2265 <p align="left"><em>direction </em>determines the direction the indicators
2266 face:<br>
2267 'front' means they face towards the front of the building<br>
2268 'back' means they face towards the back of the building<br>
2269 'left' means they face left<br>
2270 'right' means they face right</p>
2271
2272 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
2273 height of the wall plate</p>
2274
2275 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
2276 and is either true or false</p>
2277
2278 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
2279 wall plate.</p>
2280
2281 <p align="left"><strong>12. SetShaftDoors</strong> - (deprecated) sets
2282 positioning and thickness of shaft doors which will be created with the
2283 <em>older AddShaftDoor</em> command. Please use the newer AddShaftDoor syntax
2284 instead.<br>
2285 Syntax: <font face="Courier New, Courier, mono"
2286 size="2">SetShaftDoors<em> number</em>, <em>thickness, CenterX,
2287 CenterZ</em></font> </p>
2288
2289 <p align="left">This command must be used before calling <em>the older
2290 AddShaftDoor</em> command. This specifies the thickness and X/Z positioning for
2291 the shaft doors that will be created. <em>Number</em> specifies the door number
2292 this is associated with (use 1 if only one door).</p>
2293
2294 <p align="left"><strong>13. AddFloorSigns</strong> - creates floor signs on all
2295 floors serviced by the elevator<br>
2296 Syntax: <font face="Courier New, Courier, mono"
2297 size="2">AddFloorSigns<em> door_number, relative, texture_prefix, direction,
2298 CenterX, CenterZ, width, height, voffset</em></font> </p>
2299
2300 <p align="left">The AddFloorSigns command creates floor signs (similar to floor
2301 indicators) on all the floors serviced by the current elevator.
2302 <em>Direction</em> is the direction the signs face, and can be either "left",
2303 "right", "front" or "back". <em>Texture_prefix</em> is the base name of the
2304 texture to load when displaying a floor ID; for example if the sign is on floor
2305 3, and you specify a prefix of "Button", it'll load the "Button3" texture.
2306 <em>Door_number</em> specifies the door number to check against, meaning if
2307 shaft doors don't exist on a certain floor for the specified door, the sign
2308 won't be created on that floor. This can be bypassed by setting
2309 <em>door_number</em> to 0.</p>
2310
2311 <p align="left"><strong>14. AddSound</strong> - creates a user-defined sound at
2312 the specified position<br>
2313 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
2314 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
2315 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
2316 direction_x, direction_y, direction_z]</em></font><br>
2317 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
2318 sound.wav, 10, 100, 5, true<br>
2319 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
2320 MySound, ambient.ogg, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
2321 0</font></p>
2322
2323 <p align="left">For information on the parameters, see the AddSound command in
2324 the Globals section. The only difference here is that the X, Y and Z position
2325 values are relative of the elevator's center/origin. <em>Loop</em> specifies if
2326 the sound should loop and play on startup.</p>
2327
2328 <p align="left"><strong>15. AddDoorComponent</strong> - creates a single
2329 elevator door component, used for creating custom door styles<br>
2330 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoorComponent
2331 <em>number, name, texture, sidetexture, thickness, direction, openspeed,
2332 closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
2333 side_th</em></font></p>
2334
2335 <p align="left">Example: <font face="Courier New, Courier, mono"
2336 size="2">AddDoorComponent 1, Left, ElevDoors, Black, 0.2, left, 0.3, 0.3,
2337 -1.75, 0, 0, 0, 8, 0, 0, 0, 0, 0</font></p>
2338
2339 <p align="left">The AddDoorComponent command allows you to create your own
2340 custom door styles. It creates a single door component within a set - for
2341 example, the standard center-open doors have 2 door components: left and right.
2342 With this command you specify the positioning of a component similar to wall
2343 creation, specify it's textures, tell it which direction it's going to travel
2344 during opening, and what it's speed will be. <em>Number</em> specifies the
2345 number of the door to create (related to the <em>Doors</em> command) - if the
2346 elevator only has one door, or if the Doors command was not used, specify 1
2347 here. <em>Texture</em> refers to the texture used on the main (front and back)
2348 sides of the door. <em>SideTexture</em> refers to the texture used on the sides
2349 (and top/bottom) of the door. <em>Direction</em> is either Up, Down, Left (or
2350 Front; is the same), or Right (or Back; is also the same). <em>Side_tw</em> and
2351 <em>side_th</em> specify the texture tiling for the sides. Use the FinishDoors
2352 command after creating the components. The above example creates the left door
2353 component for the standard center-open doors, and uses default speed values.
2354 This command replaces the AddDoors command.</p>
2355
2356 <p align="left"><strong>16. AddShaftDoorsComponent</strong> - creates a single
2357 shaft door component for all serviced floors - used for creating custom door
2358 styles<br>
2359 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoorsComponent
2360 <em>number, name, texture, sidetexture, thickness, direction, openspeed,
2361 closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
2362 side_th</em></font></p>
2363
2364 <p align="left">This command is almost identical to the AddDoorComponent
2365 command, except that it creates shaft doors. Use the FinishShaftDoors command
2366 after creating the components. This command replaces the AddShaftDoors command.
2367 To create shaft doors on a per-floor basis, use the AddShaftDoorComponent
2368 command in the Floors section.</p>
2369
2370 <p align="left"><strong>17. FinishDoors</strong> - finishes elevator door
2371 creation - use this after all related AddDoorComponent commands are used.<br>
2372 Syntax: <font face="Courier New, Courier, mono" size="2">FinishDoors
2373 <em>number[, door_walls, track_walls]</em></font></p>
2374
2375 <p align="left">This command completes the elevator door creation by storing
2376 the central location and shift factor, cutting walls for the door, creating
2377 side connection pieces for the cut, etc. The optional <em>door_walls</em>
2378 option specifies if the command should create the side door filler walls (texture used is "ConnectionWall"), and the
2379 optional <em>track_walls</em> option specifies if the top/bottom track connection walls
2380 should be made (texture used is "Connection").</p>
2381
2382 <p align="left"><strong>18. FinishShaftDoors</strong> - finishes shaft door
2383 creation for all serviced floors - use this after all related
2384 AddShaftDoorsComponent commands are used, or specify it without the
2385 AddShaftDoorComponent commands if you're creating a manual shaft door.<br>
2386 Syntax: <font face="Courier New, Courier, mono" size="2">FinishShaftDoors
2387 <em>number[, door_walls, track_walls]</em></font></p>
2388
2389 <p align="left">This command is almost identical to the FinishDoors command
2390 except that it's used for finishing shaft doors on all serviced floors.</p>
2391
2392 <p align="left"><strong>19. AddDoor</strong> - adds a textured door in the
2393 specified location, which moves with the elevator<br>
2394 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoor <em>opensound,
2395 closesound, texturename, open, thickness</em>, <em>direction, speed,
2396 CenterX</em>, <em>CenterZ</em>, <em>width</em>, <em>height</em>,
2397 <em>voffset</em>, <em>tw</em>, <em>th</em></font></p>
2398
2399 <p align="left">See the AddDoor command in the floor section for information on
2400 the parameters. <em>CenterX</em> and <em>CenterZ</em> are relative of the
2401 elevator's center.</p>
2402
2403 <p align="left"><strong>20. AddModel</strong> - adds a 3D model to the floor.
2404 The model's textures/materials must be defined in a separate ".material" file,
2405 and a separate collider mesh ".collider" will be loaded. If a collider mesh
2406 isn't available, a simple box collider will be created.<br>
2407 Syntax: <font face="Courier New, Courier, mono" size="2">AddModel<em> name,
2408 filename, center, CenterX, CenterY, CenterZ, RotationX, RotationY, RotationZ,
2409 MaxRenderDistance, ScaleMultiplier, EnablePhysics, Restitution, Friction,
2410 Mass</em><em><br>
2411 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
2412 MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font></p>
2413
2414 <p align="left">The <em>Center</em> value is either true or false, and
2415 determines if the loaded model should be automatically centered, otherwise the
2416 exact mesh positioning in the model file will be used. The <em>CenterY</em>
2417 value is relative to the current floor's base. <em>MaxRenderDistance</em>
2418 determines the maximum distance in feet that the object will be shown (0 means
2419 unlimited). <em>ScaleMultiplier</em> allows you to change the size of the
2420 object during the load - for example, set to 2 to double the size. Models are
2421 in the OGRE native mesh format. In the example, the material/texture file is
2422 cube.material, and the optional collider mesh file is cube.collider.
2423 <em>EnablePhysics</em> enables Bullet physics on the object, and
2424 <em>Restitution</em>, <em>Friction</em> and <em>Mass</em> determine the
2425 physical properties of the object.</p>
2426
2427 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>21.
2428 AddActionControl</strong> - creates a custom control that uses a specific
2429 action defined by AddAction.<br>
2430 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
2431 <em>name, sound, direction, centerx, centerz, width, height, voffset,
2432 action_name(s), texture_name(s)<br>
2433 </em></font>Example: <font face="Courier New, Courier, mono"
2434 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
2435 UndoMyAction, MyAction, Touch, TouchLit<br>
2436 </font><br>
2437 AddActionControl command creates an advanced control similar to elevator button
2438 panel controls, but assigned to an action created with the AddAction command.
2439 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
2440 to specify a list of actions, and a list of textures to go along with those
2441 actions. There needs to be a texture for every action; if you specify 3 actions
2442 and only 2 textures, you will get an error. The control starts up in the first
2443 action, and switches to the next actions in sequence when it's clicked.
2444 <em>Direction</em> is the direction the control itself will face in 3D space
2445 (front, left, right, back). <em>Voffset</em> is relative of the elevator's
2446 base. Leave the sound field blank for no sound to be
2447 played.<strong></strong></p>
2448
2449 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>22.
2450 AddTrigger</strong> - creates a trigger that is used to signal an action when
2451 the user's camera enters or leaves the defined area.<br>
2452 Syntax:<font face="Courier New, Courier, mono" size="2"> AddTrigger <em>name,
2453 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
2454 </em></font>Example:<font face="Courier New, Courier, mono"
2455 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
2456 UndoMyAction, MyAction</font><br>
2457 <br>
2458 AddTrigger creates a trigger similar to action controls (AddActionControl) and
2459 elevator controls. The <em>action_names(s)</em> parameter allows you to specify
2460 a list of actions that this trigger will call when the camera enters or exits
2461 the area. The trigger starts in the first action, and will switch to each
2462 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
2463 <em>Z</em> parameters specify the 3D box that defines the trigger area, and are
2464 relative of the elevator's location. Leave the <em>sound</em> field blank for
2465 no sound to be played.</p>
2466
2467 <p align="left"> </p>
2468
2469 <p align="left"><strong><font size="+1"><a name="GlobalCommands"
2470 id="GlobalCommands"></a>8. Global Commands/Functions</font></strong></p>
2471
2472 <p align="left">These commands and functions can be used anywhere in the
2473 script. In this section, <em>Destobject</em> refers to the destination object
2474 to create other objects in. It can be either <em>floor </em>(only available
2475 within a Floor section)<em>, elevator </em>(only available within an Elevator
2476 section), <em>external</em>, <em>landscape</em>, or <em>buildings</em> (more
2477 will come soon). When the command is used inside a <em>Floor</em> section, and
2478 <em>Destobject</em> is not <em>floor</em>, the altitude of the current floor
2479 will be used, and altitude/y values specified in these commands will be offsets
2480 of that altitude.</p>
2481
2482 <p align="left"><br>
2483 <strong>a. AddTriangleWall</strong> - adds a textured triangular wall. If
2484 specified in a floor section, the Y values are then relative to the floor
2485 base.<br>
2486 Syntax: <font face="Courier New, Courier, mono" size="2">AddTriangleWall
2487 <em>destobject, name, texturename</em>, <em>x1</em>, <em>y1</em>, <em>z1</em>,
2488 <em>x2</em>, <em>y2</em>, <em>z2</em>, <em>x3</em>, <em>y3</em>, <em>z3</em>,
2489 <em>tw</em>, <em>th</em></font><br>
2490 Example: <font face="Courier New, Courier, mono" size="2">AddTrianglewall
2491 external, My Triangle, brick, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0</font></p>
2492
2493 <p align="left"><strong>b. AddWall</strong> - adds a textured wall<br>
2494 Syntax: <font face="Courier New, Courier, mono" size="2">AddWall
2495 <em>destobject, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
2496 <em>x2</em>, z2, <em>height1</em>, <em>height2</em>, <em>altitude1</em>,
2497 <em>altitude2</em>, <em>tw</em>, <em>th</em></font><br>
2498 Example: <font face="Courier New, Courier, mono" size="2">AddWall buildings,
2499 Wall1, brick, 0.5, -10, -10, 10, 10, 15, 15, Floor(2).Altitude,
2500 Floor(2).Altitude, 0, 0</font></p>
2501
2502 <p align="left">The command's parameters are the same as the Floor section's
2503 AddWall command.</p>
2504
2505 <p align="left"><strong>c. AddFloor</strong> - adds a textured floor<br>
2506 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloor
2507 <em>destobject, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
2508 <em>x2</em>, <em>z2</em>, <em>altitude1</em>, <em>altitude2</em>, reverse_axis,
2509 texture_direction, <em>tw</em>, <em>th</em></font></p>
2510
2511 <p align="left">The command's parameters are the same as the Floor section's
2512 AddFloor command.</p>
2513
2514 <p align="left"><strong>d. AddGround</strong> - adds a tile-based ground<br>
2515 Syntax: <font face="Courier New, Courier, mono" size="2">AddGround <em>name,
2516 texturename</em>, <em>x1</em>, <em>z1</em>, <em>x2</em>, <em>z2</em>,
2517 <em>altitude</em>, <em>tile_x</em>, <em>tile_y<br>
2518 </em></font>Example: <font face="Courier New, Courier, mono" size="2">AddGround
2519 AddGround Ground, Downtown, -158400, -158400, 158400, 158400, 0, 7920,
2520 7920</font></p>
2521
2522 <p align="left">This command is mainly for creating large ground sections,
2523 since using the AddFloor function with a large amount of texture tiling causes
2524 interference problems. The <em>X</em> and <em>Z</em> values specify the total
2525 size of the ground, and the <em>tile_x</em> and <em>tile_y</em> specify the
2526 size of each tile square to create. For example, if the ground is 10,000 feet
2527 wide, and tile_x and tile_y are both 1000, then 100 total tiles will be
2528 created; 10 wide and 10 deep. In the example above 7920 is 1/40 of the total
2529 width (316800 which is 158400 * 2), so the tile grid will be 40x40 tiles.</p>
2530
2531 <p align="left"><strong>e. CreateWallBox</strong> - creates 4 walls (box) at
2532 the specified coordinate locations<br>
2533 Syntax: <font face="Courier New, Courier, mono" size="2">CreateWallBox
2534 <em>destobject</em>, <em>name, texturename</em>, <em>x1</em>, <em>x2</em>,
2535 <em>z1</em>, <em>z2</em>, <em>height</em>, <em>voffset</em>, <em>tw</em>,
2536 <em>th, inside, outside, top, bottom </em></font><br>
2537 Example: <font face="Courier New, Courier, mono" size="2">CreateWallBox
2538 external, My Box, brick, -10, 10, -10, 10, 15, 0, 0, 0, true, true, true,
2539 true</font></p>
2540
2541 <p align="left">The parameters in this command are very similar to the ones in
2542 the AddWall command shown below in the Floor section, except that a box is
2543 created instead of a single wall. <em>Inside</em> and <em>outside</em>
2544 determine if the wall should be visible from the inside/outside, and
2545 <em>top</em> and <em>bottom</em> determine if the top and bottom walls should
2546 be drawn.</p>
2547
2548 <p align="left"><strong>f. CreateWallBox2</strong> - creates 4 walls (box) at a
2549 specified central location<br>
2550 Syntax: <font face="Courier New, Courier, mono" size="2">CreateWallBox2
2551 <em>destobject</em>, <em>name, texturename</em>, <em>centerx</em>,
2552 <em>centerz</em>, <em>widthx</em>, <em>lengthz</em>, <em>height</em>,
2553 <em>voffset</em>, <em>tw</em>, <em>th</em></font><font
2554 face="Courier New, Courier, mono" size="2"><em>, inside, outside, top, bottom
2555 </em></font><br>
2556 Example: <font face="Courier New, Courier, mono" size="2">CreateWallBox2
2557 external, My Box, brick, 0, 0, 10, 10, 15, 0, 0, 0, false, true, false,
2558 false</font></p>
2559
2560 <p align="left">The parameters are the same as the above command, except that
2561 <em>centerx</em> and <em>centerz</em> define the center of the box, and
2562 <em>widthx</em> and <em>lengthz</em> specify the width and length off of the
2563 center.<br>
2564 <br>
2565 <strong>g. AddCustomWall</strong> - creates a custom polygon (wall, floor, etc)
2566 with any number of vertex points. For example, a triangular wall has 3 vertex
2567 points, and a standard wall has 4. This function allows at least 3 vertices.<br>
2568 Syntax: <font face="Courier New, Courier, mono" size="2">AddCustomWall
2569 <em>destobject, name, texturename, x1, y1, z1, x2, y2, z2, x3, y3, z3, ..., tw,
2570 th</em></font><br>
2571 Example: <font face="Courier New, Courier, mono" size="2">AddCustomWall
2572 external, My Wall, brick, 0, 0, 0, 0, 10, 0, 10, 10, 0, 10, 0, 10, 0,
2573 0</font></p>
2574
2575 <p align="left"><strong>h. AddCustomFloor</strong> - the same as AddCustomWall,
2576 but with only one vertical parameter. If specified while in a floor section,
2577 the altitude is relative to the current floor's base.<br>
2578 Syntax: <font face="Courier New, Courier, mono" size="2">AddCustomFloor
2579 <em>destobject, name, texturename, x1, z1, x2, z2, x3, z3, ..., altitude, tw,
2580 th</em></font><br>
2581 Example: <font face="Courier New, Courier, mono" size="2">AddCustomFloor
2582 external, My Wall, brick, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0</font></p>
2583
2584 <p align="left"><strong>i. AddShaft</strong> - creates a shaft at a specified
2585 location and floor range<br>
2586 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaft <em>number,
2587 centerx, centerz, startfloor, endfloor</em></font><br>
2588 Example: <font face="Courier New, Courier, mono" size="2">AddShaft 1, 10, 10,
2589 0, 9</font></p>
2590
2591 <p align="left">The <em>number</em> parameter specifies the shaft number to
2592 create. This command just tells the simulator the area that the shaft will take
2593 up, and does not create the actual shaft walls. Later on when you create the
2594 walls/floors for the shaft, make sure that you make a floor at the very bottom
2595 and very top of the shaft (they can extend beyond the walls).</p>
2596
2597 <p align="left"><strong>j. CreateStairwell</strong> - creates a stairwell at a
2598 specified location and floor range<br>
2599 Syntax: <font face="Courier New, Courier, mono" size="2">CreateStairwell
2600 <em>number, centerx, centerz, startfloor, endfloor</em></font><br>
2601 Example: <font face="Courier New, Courier, mono" size="2">CreateStairwell 1,
2602 10, 10, 0, 9</font></p>
2603
2604 <p align="left">The <em>number</em> parameter specifies the stairwell number to
2605 create. This command just tells the simulator the area that the stairwell will
2606 take up, and does not create the actual walls.</p>
2607
2608 <p align="left"><strong>k. WallOrientation</strong> - changes the internal wall
2609 orientation parameter, which is used for determining the wall thickness
2610 boundaries in relation to their coordinates.<br>
2611 Syntax:<font face="Courier New, Courier, mono" size="2"> WallOrientation =
2612 <em>direction</em></font><br>
2613 Example: <font face="Courier New, Courier, mono" size="2">WallOrientation =
2614 left</font></p>
2615
2616 <p align="left">The <em>direction</em> parameter can either be left, center, or
2617 right. Center is default. For example, if center is used, than half of the
2618 wall's thickness is to the right (positive) of it's x1/x2 or z1/z2 coordinates,
2619 and half is to the left (negative) of the coordinates. If left is used, than
2620 the coordinates define the wall's left (negative) edge, and the full thickness
2621 is to the right (positive) of those. If right is used, then again the
2622 coordinates define the wall's right (positive) edge, and the full thickness is
2623 to the left (negative) of those. See this graphic for a good example:</p>
2624
2625 <p align="left"><img src="guide/wall_info.jpg"></p>
2626
2627 <p align="left">In the graphic above, the large box at the top shows what the X
2628 and Z coordinates correspond to. The lower examples show the wall orientation
2629 as left or right, and if either the difference in x values or z values is
2630 larger.</p>
2631
2632 <p align="left"><strong>l. FloorOrientation</strong> - changes the internal
2633 floor orientation parameter, which is used for determining the floor thickness
2634 boundaries in relation to their coordinates.<br>
2635 Syntax:<font face="Courier New, Courier, mono" size="2"> FloorOrientation =
2636 <em>direction</em></font><br>
2637 Example: <font face="Courier New, Courier, mono" size="2">FloorOrientation =
2638 bottom</font></p>
2639
2640 <p align="left">The <em>direction</em> parameter can either be bottom, center,
2641 or top. Top is default. For example, if center is used, than half of the
2642 floor's thickness is above (positive) it's x1/x2 or z1/z2 coordinates, and half
2643 is below (negative) the coordinates. If bottom is used, than the coordinates
2644 define the floor's bottom edge, and the full thickness is the top (positive).
2645 If top is used, then again the coordinates define the floor's top edge, and the
2646 full thickness is the bottom (negative).</p>
2647
2648 <p align="left"><strong>m. DrawWalls</strong> - specifies which parts of a wall
2649 or floor should be drawn.<br>
2650 Syntax:<font face="Courier New, Courier, mono" size="2"> DrawWalls =
2651 <em>MainNegative, MainPositive, SideNegative, SidePositive, Top,
2652 Bottom</em></font><br>
2653 Example: <font face="Courier New, Courier, mono" size="2">DrawWalls = true,
2654 true, false, false, false, false</font></p>
2655
2656 <p align="left">The example shown is the default setting. <em>MainNegative</em>
2657 is the main (that makes up the front of a wall lengthwise, or the top area of a
2658 floor) face on the negative side, <em>MainPositive</em> is the main face on the
2659 positive side (back of a wall, or the bottom area of a floor),
2660 <em>SideNegative</em> is the side (the part that is along the thickness) face
2661 on the negative side, <em>SidePositive</em> is the side face on the positive
2662 side; <em>Top</em> refers to either the top side if a wall, or to the front
2663 face if a floor; <em>Bottom</em> refers to either the bottom side if a wall, or
2664 the back face if a floor. The following graphic explains the sides in detail:
2665 </p>
2666
2667 <p align="left"><img src="guide/sides.jpg"></p>
2668
2669 <p align="left"><strong>n. SetPlanarMapping</strong> - sets the planar texture
2670 mapper's parameters.<br>
2671 Syntax: <font face="Courier New, Courier, mono" size="2">SetPlanarMapping
2672 <em>Flat, FlipX, FlipY, FlipZ, Rotate</em></font><br>
2673 Example: <font face="Courier New, Courier, mono" size="2">SetPlanarMapping
2674 false, false, false, true, false</font></p>
2675
2676 <p align="left"><em>FlipX</em>, <em>FlipY</em> and <em>FlipZ</em> reverse the
2677 texture mapping per axis, and <em>Flat</em> has it ignore depth., Skyscraper by
2678 default uses a simple planar texture mapper, which in simple terms draws the
2679 texture in a box around the object. With a basic wall, the top-left of the
2680 texture image is mapped to the top left of the wall, the top-right is mapped to
2681 the top-right of the wall, etc. If you want the top-right of the texture mapped
2682 to the top-left of the wall for example (to flip or change alignment), you'd
2683 set <em>FlipX</em> to false. This command is mainly used to change alignment -
2684 since the top-left of the texture is mapped to the top-left of the object, that
2685 means that textures have a left/top alignment by default. If you change
2686 <em>FlipX</em> to true, it'll be right-aligned. If you change <em>FlipY</em> to
2687 true, it'll be bottom-aligned. <em>Rotate</em> has it rotate the texture
2688 mapping 90 degrees counterclockwise, so instead of the texture being mapped
2689 from the top left to bottom right, if <em>Rotate</em> is true, it'll be mapped
2690 from the bottom left to top right. See this picture for an example:</p>
2691
2692 <p align="left"><img src="guide/extents.jpg"></p>
2693
2694 <p align="left">In the above picture, I tiled a texture (a black box with
2695 yellow around it) 2.5 times on width and height. The bottom floor shows the
2696 default texture mapping (ReverseExtents false, false, false, false, false);
2697 you'll notice that it's aligned to the top-left. In the middle one, I set the
2698 <em>FlipX</em> value to true (ReverseExtents false, true, false, false, false).
2699 In the top one, I set the <em>FlipY</em> value to true (ReverseExtents false,
2700 false, true, false, false).</p>
2701
2702 <p align="left"><strong>o. SetTextureMapping</strong> - manually sets UV
2703 texture mapping for all polygons generated after this command;
2704 ResetTextureMapping restores the values to the defaults or previous<br>
2705 Syntax:<font face="Courier New, Courier, mono" size="2"> SetTextureMapping
2706 <em>vertex1, u1, v1, vertex2, u2, v2, vertex3, u3, v3</em></font><br>
2707 Example: <font face="Courier New, Courier, mono" size="2">SetTextureMapping 0,
2708 0, 0, 1, 1, 0, 2, 1, 1</font></p>
2709
2710 <p align="left">The example shown above is the default value used by the
2711 simulator. This command maps the texture coordinates to the specified 3 vertex
2712 indices - normally a side of a wall will have 4 vertices/sets of coordinates (0
2713 to 3), and by default the first three are used (top left, top right and bottom
2714 right respectively), with the UV coordinates representing the size percentage
2715 of the texture (with 1 being 100%, 0.5 being 50%, etc; normally this would
2716 relate to absolute texture coordinates) - so in the example, texture coordinate
2717 0,0 (top left) is mapped at the first vertex (top left); texture coordinate 1,0
2718 (really "width, 0") being mapped at the second vertex (top right), and texture
2719 coordinate 1,1 (really "width, height") being mapped to the bottom right. For a
2720 standard wall, the valid vertex values are from 0 to 3. If a wall or floor is
2721 created with AddCustomWall, and if it has for example 7 vertex points, the
2722 valid values for this command would then be 0 to 6 (but only 3 vertices can be
2723 used for mapping purposes). One caveat with manual texture mapping is that
2724 sometimes the simulator will automatically reverse the vertices to keep the
2725 wall faces oriented properly, so if you set your texture mapping this way and
2726 notice issues, try reversing the coordinates (u3 would be u1 for a 3-point
2727 triangular wall, etc) and see if that helps. Textures can also be cropped with
2728 this command - for example, to map only a central square of a texture, you'd
2729 use:<br>
2730 <font face="Courier New, Courier, mono" size="2">SetTextureMapping 0, 0.25,
2731 0.25, 1, 0.75, 0.25, 2, 0.75, 0.75</font></p>
2732
2733 <p align="left">Here's an easier way to see the example above:</p>
2734
2735 <p align="left"><font face="Courier New, Courier, mono" size="2">0 -&gt; 0,
2736 0<br>
2737 1 -&gt; 1, 0<br>
2738 2 -&gt; 1, 1</font></p>
2739
2740 <p align="left">The following diagram shows the mapping described above.
2741 Texture location 0,0 is mapped to wall vertex 0, location 1,0 is mapped to
2742 vertex 1, etc:</p>
2743
2744 <p align="left"><img src="guide/texture_mapping.jpg" width="300"
2745 height="300"></p>
2746
2747 <p align="left"><strong>p. SetTextureMapping2</strong> - advanced version of
2748 SetTextureMapping - manually sets UV texture mapping for all polygons generated
2749 after this command; ResetTextureMapping restores the values to the defaults or
2750 previous<br>
2751 Syntax:<font face="Courier New, Courier, mono" size="2"> SetTextureMapping2
2752 <em>v1x, v1y, v1z, u1, v1, v2x, v2y, v2z, u2, v2, v3x, v3y, v3z, u3,
2753 v3</em></font><br>
2754 Example: <font face="Courier New, Courier, mono" size="2">SetTextureMapping2
2755 x0, y0, z0, 0, 0, x1, y1, z1, 1, 0, x2, y2, z2, 1, 1</font></p>
2756
2757 <p align="left">See the above description of SetTextureMapping for a detailed
2758 description on texture mapping in general. This command mostly does the same as
2759 that command, and the example given is the default command (and is equivalent
2760 to the SetTextureMapping example). Instead of just choosing which vertex
2761 indices to use like SetTextureMapping, this command lets you create your own
2762 texture vertices (sets of coordinates) using coordinates of already-existing
2763 vertices. The vertex values that can be used start with an "x", "y" or "z",
2764 followed by the vertex index. In the example, the X, Y and Z values of the
2765 first vertex are mapped to UV coordinate 0,0 - this is because "x0, y0, z0" was
2766 specified. A specification of "x0, y2, z0" will use the X and Z values from
2767 vertex 0, but the Y value from vertex 2. This way you can specify coordinates
2768 outside of the wall/polygon's range. Here's an easier way to see the
2769 example:</p>
2770
2771 <p align="left"><font face="Courier New, Courier, mono" size="2">x0, y0, z0
2772 -&gt; 0, 0<br>
2773 x1, y1, z1 -&gt; 1, 0<br>
2774 x2, y2, z2 -&gt; 1, 1</font></p>
2775
2776 <p align="left"><strong>q. ResetTextureMapping</strong> - resets the texture
2777 mapping parameters to either the default or previous values<br>
2778 Syntax:<font face="Courier New, Courier, mono" size="2"> ResetTextureMapping =
2779 <em>default</em></font><br>
2780 Example: <font face="Courier New, Courier, mono" size="2">ResetTextureMapping =
2781 true </font></p>
2782
2783 <p align="left">If <em>default</em> is true, the texture mapping values are
2784 reset to the default, which is shown above in the SetTextureMapping's example.
2785 If <em>default</em> is false, the previous values will be loaded and used.</p>
2786
2787 <p align="left"><strong>r. ReverseAxis</strong> - this command is deprecated,
2788 and only used for older versions of the AddFloor commands, since the current
2789 ones have this option built-in. This reverses the axis that the difference in
2790 altitude/voffset for floors corresponds to. In the AddFloor command, there are
2791 parameters for specifying two different altitudes. By default, if the altitudes
2792 are different, the floor will angle upward/downward along the Z axis
2793 (front/back), but if this is set to true, the floor will angle along the X axis
2794 (left/right).<br>
2795 Syntax:<font face="Courier New, Courier, mono" size="2"> ReverseAxis =
2796 <em>value</em></font></p>
2797
2798 <p align="left"><strong>s. ShaftCut</strong> - used in conjunction with a shaft
2799 object - performs a vertical box cut on all floor objects (floors, ceilings,
2800 interfloor, etc) in the specified range.<br>
2801 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftCut <em>number,
2802 startx, startz, endx, endz, start_voffset, end_voffset</em></font><br>
2803 Example: <font face="Courier New, Courier, mono" size="2">ShaftCut 1, -4, -3.5,
2804 4, 3.5, 0, 5</font></p>
2805
2806 <p align="left"><em>Number</em> is the number of the shaft object to work with.
2807 <em>Startx</em>, <em>startz</em>, <em>endx</em>, and <em>endz</em> are two sets
2808 of coordinates that specify the cut box's start position and end position,
2809 relative to the shaft's central position. <em>Start_voffset</em> is the
2810 position above the starting floor's altitude to start the cut at, and
2811 <em>end_voffset</em> is the position above the ending floor's altitude to end
2812 the cut at. The example cuts a box for shaft 1, with a width from -4 to 4, and
2813 a length from -3.5 to 3.5, starting at the starting floor's altitude, and
2814 ending at 5 feet above the ending floor's altitude.</p>
2815
2816 <p align="left"><strong>t. CutStairwell</strong> - used in conjunction with a
2817 stairwell object - performs a vertical box cut on all floor objects (floors,
2818 ceilings, interfloor, etc) in the specified range. For the parameters, see the
2819 ShaftCut command.<strong><br>
2820 </strong>Syntax: <font face="Courier New, Courier, mono" size="2">CutStairwell
2821 <em>number, startx, startz, endx, endz, start_voffset,
2822 end_voffset</em></font><br>
2823 Example: <font face="Courier New, Courier, mono" size="2">CutStairwell 1, -4,
2824 -3.5, 4, 3.5, 0, 5</font></p>
2825
2826 <p align="left"><strong>u. Isect</strong> - the Isect function calculates the
2827 position that a line intersects with a certain object, such as a floor. Since
2828 this is a function, it can be used in-line anywhere.<br>
2829 Syntax:<font face="Courier New, Courier, mono" size="2"> isect(<em>destobject,
2830 objectname, startx, starty, startz, endx, endy, endz</em>)</font><br>
2831 Example: <font face="Courier New, Courier, mono" size="2">isect(external,
2832 wall1, 10, 10, 0, -10, 10, 0)</font></p>
2833
2834 <p align="left"><em>Destobject</em> is the destination object to get the object
2835 from (floor, external, landscape, or buildings). <em>Startx</em>,
2836 <em>starty</em>, and <em>startz</em> make up the position of the starting
2837 position, and <em>endx</em>, <em>endy</em> and <em>endz</em> make up the ending
2838 position. The first intersection of the named object is the return value, in
2839 "X, Y, Z" format (for example, "10, 1, 3").</p>
2840
2841 <p align="left"><strong>v. SetAutoSize</strong> - enables or disables texture
2842 autosizing<br>
2843 Syntax:<font face="Courier New, Courier, mono" size="2"> SetAutoSize =
2844 <em>AutoWidth, AutoHeight </em></font><br>
2845 Example: <font face="Courier New, Courier, mono" size="2">SetAutoSize = true,
2846 true</font></p>
2847
2848 <p align="left">This command will determine if the simulator should
2849 automatically size texture appropriately when applied to an object, such as a
2850 wall or floor. By default, both are enabled. The <em>AutoWidth</em> and
2851 <em>AutoHeight</em> parameters correspond to the "<em>tw</em>" and
2852 "<em>th</em>" parameters of the <em>AddWall</em>, <em>AddFloor</em>, etc
2853 commands. If any are false, then the parameters specified in the
2854 <em>AddWall</em> etc commands multiply the texture values stored with with the
2855 <em>Load</em> or <em>LoadRange</em> commands (see below); those values relate
2856 to the number of times a texture is tiled; so if <em>AutoHeight</em> is set to
2857 False, "2" is specified in the "<em>th</em>" value of <em>AddWall</em>, and the
2858 texture's stored "th" value is 1, then the texture will be tiled twice
2859 vertically. If either are true, the specified value will me multiplied by the
2860 related stored texture value and then autoadjusted.</p>
2861
2862 <p align="left"><strong>w. TextureOverride</strong> - overrides textures for
2863 the next command. Currently only works with the different AddWall, AddFloor and
2864 AddInterFloor commands.<br>
2865 Syntax:<font face="Courier New, Courier, mono" size="2"> TextureOverride
2866 <em>MainNegativeTex, MainPositiveTex, SideNegativeTex, SidePositiveTex, TopTex,
2867 Bottom</em></font><font face="Courier New, Courier, mono"
2868 size="2"><em>Tex</em></font><br>
2869 Example: <font face="Courier New, Courier, mono" size="2">TextureOverride
2870 Metal1, ElevFloor, Metal1, Metal1, Metal1, Metal1</font></p>
2871
2872 <p align="left">This command will allow you to specify multiple textures for a
2873 single command such as AddWall. It will only work on the command immediately
2874 after this one. In the above example, the Main Positive side of the object will
2875 have the texture "ElevFloor", but all other sides will use "Metal1".</p>
2876
2877 <p align="left"><strong>x. ShaftShowFloors</strong> - allows a range of floors
2878 to be shown in an elevator or shaft, primarily for glass elevators.<br>
2879 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftShowFloors
2880 <em>ShaftNumber</em> = <em>range/list[, full]</em></font><br>
2881 Example: <font face="Courier New, Courier, mono" size="2">ShaftShowFloors 1 = 1
2882 - 10</font><br>
2883 Example 2: <font face="Courier New, Courier, mono" size="2">ShaftShowFloors 1 = 1
2884 - 10, true</font></p>
2885
2886 <p align="left">The <em>full</em> parameter is optional, and if it is false or not specified (the default),
2887 only a range of floors are shown at a time (by default 3 at a time, and only the ones specified), while the elevator is moving, and is normally used in
2888 conjunction with the <em>Group</em> command for atriums.  If <em>full</em> is true, all the floors in
2889 the list or range are shown at a time, while the user is in the shaft, regardless of if the elevator
2890 is moving or not, and are disabled when the user exits the shaft.  In the first example above, let's say the user
2891 is in an elevator in shaft 1, and is moving upwards from the 2nd floor. In this situation, floors 1 to 10
2892 will be displayed, either a few at a time or the whole set (depending on the Group command), but after they go beyond the range,
2893 those floors will be disabled.  In the second example, when the user enters the shaft or elevator, floors
2894 1 to 10 will all be enabled, and when they exit the elevator/shaft, those floors will be disabled.
2895 For a basic glass elevator, the second example would be used, along with the <em>Group</em> command to group
2896 floors 1 to 10 together.</p>
2897
2898 <p align="left"><strong>y. ShaftShowInterfloors</strong> - display specific
2899 interfloors while inside a shaft.  This is primarily for pipe/utility shafts.<br>
2900 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftShowInterfloors
2901 <em>ShaftNumber</em> = <em>range/list</em></font><br>
2902 Example: <font face="Courier New, Courier, mono" size="2">ShaftShowInterfloors 1 =
2903 1 - 10</font></p>
2904
2905 <p align="left"><strong>z. ShaftShowOutside</strong> - allows objects outside
2906 the building (sky, landscape, etc) to be enabled while the user is both inside
2907 the specified shaft and on one of the specified floors - primarily for glass
2908 elevators.<br>
2909 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftShowOutside
2910 <em>ShaftNumber</em> = <em>range/list</em></font><br>
2911 Example: <font face="Courier New, Courier, mono" size="2">ShaftShowOutside 1 =
2912 1 - 10</font></p>
2913
2914 <p align="left">In the above example, if a user is riding an elevator in shaft
2915 1, the outside (sky, landscape, etc) will be enabled while the elevator is on
2916 any of the floors from 1 to 10. Once the elevator reaches the 11th floor, the
2917 outside will be disabled. This command can be mixed with
2918 <em>ShaftShowFloors</em> for mixed atrium/external glass elevators such as the
2919 ones in the Glass Tower, where the elevator moves upwards through an indoor
2920 atrium, and eventually outside above the atrium. In that situation, the floors
2921 that comprise the lower (atrium) section would be specified using
2922 <em>ShaftShowFloors</em> (such as 1-10), while the upper (outdoor) floors would
2923 be specified using <em>ShaftShowOutside</em> (such as 11-20).</p>
2924
2925 <p align="left"><strong>aa. ShowFullShaft</strong> - determines if an entire
2926 shaft should always be shown, such as a glass elevator track.<br>
2927 Syntax:<font face="Courier New, Courier, mono" size="2"> ShowFullShaft
2928 <em>ShaftNumber</em> = <em>value</em></font><br>
2929 Example: <font face="Courier New, Courier, mono" size="2">ShowFullShaft 1 =
2930 true</font></p>
2931
2932 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ab.
2933 StairsShowFloors</strong> - allows a range of floors to be shown while inside
2934 the specified stairwell.<br>
2935 Syntax:<font face="Courier New, Courier, mono" size="2"> StairsShowFloors
2936 <em>StairwellNumber</em> = <em>range/list</em></font><br>
2937 Example: <font face="Courier New, Courier, mono" size="2">StairsShowFloors 1 =
2938 1 - 10</font><br>
2939 In the above example, let's say the user is in stairwell 1, and is walking
2940 upwards from the 2nd floor. In this situation, the 2nd floor will be
2941 visible/enabled while they're walking up (since it was in the range specified
2942 with this command), but when they reach the 11th floor, that floor will be
2943 invisible/disabled.</p>
2944
2945 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ac.
2946 ShowFullStairs</strong> - determines if an entire stairwell should be shown
2947 while the user is inside - useful for stairwells that have a gap in the center
2948 between the actual stairs.<br>
2949 Syntax:<font face="Courier New, Courier, mono" size="2"> ShowFullStairs
2950 <em>StairwellNumber</em> = <em>value</em></font><br>
2951 Example: ShowFullStairs 1 = true</p>
2952
2953 <p align="left"><strong>ad. TextureFlip</strong> - flips specified textures for
2954 the next command.. Currently only works with the different AddWall, AddFloor
2955 and AddInterFloor commands. The values available are 0 for no flipping, 1 for
2956 horizontal flip, 2 for vertical flip, and 3 for both horizontal and
2957 vertical.<br>
2958 Syntax:<font face="Courier New, Courier, mono" size="2"> TextureFlip
2959 <em>MainNegative, MainPositive, SideNegative, SidePositive, Top,
2960 Bottom</em></font><br>
2961 Example: <font face="Courier New, Courier, mono" size="2">TextureFlip 1, 1, 0,
2962 0, 0, 0</font></p>
2963
2964 <p align="left">This command will allow you to flip textures on specific parts
2965 of a wall or floor created with a command such as AddWall. It will only work on
2966 the command immediately after this one. In the above example, the Main Positive
2967 and Main Negative sides of the object will have their textures flipped
2968 horizontally.</p>
2969
2970 <p align="left"><strong>ae. Cut</strong> - performs a manual box cut on an
2971 object<br>
2972 Syntax: <font face="Courier New, Courier, mono" size="2">Cut <em>destobject,
2973 x1, y1, z1, x2, y2, z2, cutwalls, cutfloors</em><br>
2974 </font>Example: <font face="Courier New, Courier, mono" size="2">Cut external,
2975 -5, -5, -5, 5, 5, 5, false, true</font></p>
2976
2977 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
2978 start and end coordinates of the box cut. If <em>cutwalls</em> is true, the
2979 function will cut walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
2980
2981 <p align="left"><strong>af. Mount</strong> - mounts a zip file in the data
2982 directory into a virtual path.<br>
2983 Syntax: <font face="Courier New, Courier, mono" size="2">Mount
2984 <em>filename</em>, <em>path</em></font><br>
2985 Example: <font face="Courier New, Courier, mono" size="2">Mount myfile.zip,
2986 mydirectory</font></p>
2987
2988 <p align="left">In this example, the file myfile.zip located in Skyscraper's
2989 data directory will be mounted as "mydirectory", and so a file such as test.jpg
2990 inside that zip file will appear as "mydirectory/test.jpg".</p>
2991
2992 <p align="left"><strong>ag. AddFloorAutoArea</strong> - defines an area that
2993 will automatically enable and disable floors when the user moves within it,
2994 similar to a stairwell<br>
2995 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloorAutoArea
2996 <em>x1, y1, z1, x2, y2, z2</em></font><br>
2997 Example: <font face="Courier New, Courier, mono" size="2">AddFloorAutoArea
2998 -100, 0, -100, 100, 100, 100</font></p>
2999
3000 <p align="left"><strong>ah. AddSound</strong> - creates a user-defined sound at
3001 the specified position<br>
3002 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
3003 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
3004 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
3005 direction_x, direction_y, direction_z]</em></font><br>
3006 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
3007 sound.wav, 10, 100, 5, true<br>
3008 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
3009 MySound, ambient.ogg, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
3010 0</font></p>
3011
3012 <p align="left">This command creates a custom sound in the specified position,
3013 and has a number of optional parameters - the defaults for the optional
3014 parameters are shown in Example 2. <em>Loop</em> specifies if the sound should
3015 loop and play on startup. If you're going to use any of the optional
3016 parameters, you must specify them all. <em>X</em>, <em>Y</em> and <em>Z</em>
3017 specify the location in 3D space that the sound will be at, <em>volume</em>
3018 specifies the volume percentage (with 1.0 being 100%) of the sound,
3019 <em>speed</em> determines the playback speed of the sound in percent,
3020 <em>min_distance</em> and <em>max_distance</em> set the minimum and maximum
3021 distances that the sound can be heard at full volume - by default, minimum is 1
3022 and maximum is -1. <em>Doppler_level </em>specifies the doppler scale for the
3023 sound (0 means off, the default, 1 is normal, 5 is max).
3024 <em>Cone_inside_angle</em> is the angle within which the sound is at it's
3025 normal volume (default 360), <em>cone_outside_angle</em> is the outside angle
3026 that the sound is at it's normal volume (default 360, shouldn't be less than
3027 the inside angle), and <em>cone_outside_volume</em> is the volume level of the
3028 sound outside (0.0 to 1.0, default 1.0)<em>. Direction_x</em>,
3029 <em>direction_y</em> and <em>direction_z</em> specify the direction of the
3030 sound cone.</p>
3031
3032 <p align="left"><strong>ai. GetWallExtents</strong> - the GetWallExtents
3033 command returns the X and Z extents (minimum and maximum values) of a wall, at
3034 the specified altitude. The command will return the results in the MinX, MinZ,
3035 MaxX and MaxZ variables.<br>
3036 Syntax:<font face="Courier New, Courier, mono" size="2"> GetWallExtents
3037 <em>destobject, wallname, altitude</em></font><br>
3038 Example: <font face="Courier New, Courier, mono" size="2">GetWallExtents
3039 external, wall1:front, 10</font></p>
3040
3041 <p align="left">Then to use the values:<br>
3042 Example: <font face="Courier New, Courier, mono" size="2">Set 2 =
3043 %minz%</font></p>
3044
3045 <p align="left"><em>Destobject</em> is the destination object to get the object
3046 from (floor, external, landscape, or buildings). <em>Wallname </em>specifies
3047 the name of the wall to get the extents from. Generally this should be in the
3048 form of "name:side", but if you leave out the "side" parameter, it'll choose
3049 one of the sides from a pre-defined search list. Sides of walls made from any
3050 AddWall command generally have "front", "back", "left" and "right" sides. Walls
3051 made using AddCustomWall and AddTriangleWall have sides of "0" (front) and "1"
3052 (back), so with those you'd specify "name:0" for the front. <em>Altitude</em>
3053 specifies the altitude to use for the check - basically it makes a copy of the
3054 wall, cuts it down to a line at that altitude, and returns the coordinates of
3055 the endpoints. The command will store the results in the MinX, MinZ, MaxX and
3056 MaxZ variables, which can be used anywhere in the script - to get the minimum X
3057 result, you'd use %minx%.</p>
3058
3059 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aj.
3060 AddAction</strong> - defines an action, to be used by custom controls and
3061 triggers.<br>
3062 Syntax:<font face="Courier New, Courier, mono" size="2"> AddAction <em>name,
3063 parent_object, command[, parameters</em></font><em>]<br>
3064 </em>Example:<font face="Courier New, Courier, mono" size="2"> AddAction
3065 MyAction, Floor 2, ChangeTexture, OldTexture, NewTexture</font><br>
3066 Example:<font face="Courier New, Courier, mono" size="2"> AddAction
3067 MySoundAction, Floor 2, PlaySound, Sound1, false</font><br>
3068 </p>
3069
3070 <p style="text-align:left;margin-left:0;margin-right:auto;">This command
3071 creates a global action, to be used with commands such as
3072 <em>AddActionControl</em> and <em>AddTrigger</em>. <em>Name</em> must be a
3073 globally-unique name. If the same name is used for multiple actions, all of
3074 those actions will be run when an object uses that name. <em>Parent_object</em>
3075 is the object to use to perform the action on. Currently includes "Global",
3076 floors such as "Floor 2", elevators such as "Elevator 1", shafts like "Shaft 1"
3077 stairwells like "Stairwell 2", and can also be specified as a range of objects,
3078 such as "Floors 3 to 8".</p>
3079
3080 <p style="text-align:left;margin-left:0;margin-right:auto;">Commands and
3081 parameters:</p>
3082
3083 <p style="text-align:left;margin-left:0;margin-right:auto;">(General)<br>
3084 <em>ChangeTexture</em>: oldtexture, newtexture<br>
3085 <em>PlaySound</em>: name, loop true/false<br>
3086 <em>OpenShaftDoor</em>: door number (0 for all), floor number (parent needs to
3087 be the elevator object)<br>
3088 <em>CloseShaftDoor</em>: door number (0 for all), floor number (parent needs to
3089 be the elevator object)<br>
3090 <em>OpenShaftDoorManual</em>: door number (0 for all), floor number (parent
3091 needs to be elevator object)<br>
3092 <em>CloseShaftDoorManual</em>: door number (0 for all), floor number (parent
3093 needs to be elevator object)<br>
3094 (for other elevator commands, see the AddControl command in the elevator
3095 section)</p>
3096
3097 <p style="text-align:left;margin-left:0;margin-right:auto;">The
3098 <em>PlaySound</em> command plays sounds created with the AddSound command. With
3099 this command, if multiple sounds have the same name, all of those sounds will
3100 be played simultaneously when the related action is run.</p>
3101
3102 <p style="text-align:left;margin-left:0;margin-right:auto;">OpenShaftDoor
3103 example, to open elevator 1's shaft doors on floor 2:</p>
3104
3105 <p style="text-align:left;margin-left:0;margin-right:auto;"><font
3106 face="Courier New, Courier, mono" size="2">AddAction MyDoorOpen, Elevator 1,
3107 OpenShaftDoor, 0, 2</font></p>
3108
3109 <p style="text-align:left;margin-left:0;margin-right:auto;">PlaySound example,
3110 to play sound FireAlarm created using the AddSound command on Floor 1:</p>
3111
3112 <p style="text-align:left;margin-left:0;margin-right:auto;"><font
3113 face="Courier New, Courier, mono" size="2">AddAction MySound, Floor 1,
3114 FireAlarm, true</font></p>
3115
3116 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ak.
3117 AddActionControl</strong> - creates a custom control that uses a specific
3118 action defined by AddAction.<br>
3119 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
3120 <em>name, sound, direction, centerx, centerz, width, height, voffset,
3121 action_name(s), texture_name(s)<br>
3122 </em></font>Example: <font face="Courier New, Courier, mono"
3123 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
3124 UndoMyAction, MyAction, Touch, TouchLit<br>
3125 </font><br>
3126 AddActionControl command creates an advanced control similar to elevator button
3127 panel controls, but assigned to an action created with the AddAction command.
3128 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
3129 to specify a list of actions, and a list of textures to go along with those
3130 actions. There needs to be a texture for every action; if you specify 3 actions
3131 and only 2 textures, you will get an error. The control starts up in the first
3132 action, and switches to the next actions in sequence when it's clicked.
3133 <em>Direction</em> is the direction the control itself will face in 3D space
3134 (front, left, right, back). Leave the sound field blank for no sound to be
3135 played.</p>
3136
3137 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>al.
3138 AddTrigger</strong> - creates a trigger that is used to signal an action when
3139 the user's camera enters or leaves the defined area.<br>
3140 Syntax:<font face="Courier New, Courier, mono" size="2"> AddTrigger <em>name,
3141 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
3142 </em></font>Example:<font face="Courier New, Courier, mono"
3143 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
3144 UndoMyAction, MyAction</font><br>
3145 <br>
3146 AddTrigger creates a trigger similar to action controls (AddActionControl) and
3147 elevator controls. The <em>action_names(s)</em> parameter allows you to specify
3148 a list of actions that this trigger will call when the camera enters or exits
3149 the area. The trigger starts in the first action, and will switch to each
3150 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
3151 <em>Z</em> parameters specify the 3D box that defines the trigger area. Leave
3152 the <em>sound</em> field blank for no sound to be played.</p>
3153
3154 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>am.
3155 SetKey</strong> - specifies that the next created model will be a key. The
3156 model will be tagged with a specific key ID number, and when clicked, the key
3157 ID will be added to the user's keyring and the model will be deleted. The value
3158 must be greater than 0.<br>
3159 Syntax:<font face="Courier New, Courier, mono" size="2"> SetKey
3160 <em>keyid</em></font><br>
3161 Example: SetKey 1</p>
3162
3163 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>an.
3164 SetLock</strong> - sets the lock and key parameters for subsequent doors,
3165 controls/buttons, and call buttons that are created.<br>
3166 Syntax:<font face="Courier New, Courier, mono" size="2"> SetLock
3167 <em>locked</em>, <em>keyid</em></font><br>
3168 Example: SetLock 1, 3</p>
3169
3170 <p style="text-align:left;margin-left:0;margin-right:auto;">For doors,
3171 <em>locked</em> specifies which sides (directions) are locked. Values are:<br>
3172 0 - unlocked<br>
3173 1 - negative-facing (left/front) side locked<br>
3174 2 - positive-facing (right/back) side locked<br>
3175 3 - both sides locked</p>
3176
3177 <p style="text-align:left;margin-left:0;margin-right:auto;">For
3178 controls/buttons and call buttons, the <em>locked</em> values are:<br>
3179 0 - unlocked<br>
3180 1 - locked</p>
3181
3182 <p style="text-align:left;margin-left:0;margin-right:auto;">Locked objects can
3183 only be unlocked if the person has the key number specified as <em>keyid</em>.
3184 If <em>keyid</em> is 0, no key is needed to lock or unlock. To reset to the
3185 defaults, use 0 for the <em>locked</em> setting and 0 for <em>keyid</em>.<br>
3186 </p>
3187
3188 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ao.
3189 Print</strong> - prints the contents of a line to the console. This command
3190 will still convert variables and even math expressions, and output the
3191 results.<br>
3192 Syntax: <font face="Courier New, Courier, mono" size="2">Print
3193 <em>text</em></font><br>
3194 Example: <font face="Courier New, Courier, mono" size="2">Print 1+1</font></p>
3195
3196 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3197
3198 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ap.
3199 Delete</strong> - deletes an object. This command is normally used after a
3200 building has loaded.<br>
3201 Syntax: <font face="Courier New, Courier, mono" size="2">Delete
3202 <em>object_number</em></font><br>
3203 Example: <font face="Courier New, Courier, mono" size="2">Delete 12</font></p>
3204
3205 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3206
3207 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aq.
3208 RunAction</strong> - runs an action by name. This command is normally used
3209 after a building has loaded.<br>
3210 Syntax: <font face="Courier New, Courier, mono" size="2">RunAction
3211 <em>name</em></font><br>
3212 Example: <font face="Courier New, Courier, mono" size="2">RunAction
3213 myaction</font></p>
3214
3215 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3216
3217 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ar.
3218 AddActionParent</strong> - adds a parent object to an existing action. See the
3219 AddAction command for details on parent objects<br>
3220 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionParent
3221 <em>name, object</em></font><br>
3222 Example: <font face="Courier New, Courier, mono" size="2">AddActionParent
3223 myaction, Elevator 2</font><br>
3224 Example: <font face="Courier New, Courier, mono" size="2">AddActionParent
3225 myaction, Floors 2 to 5</font></p>
3226
3227 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3228
3229 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>as.
3230 RemoveActionParent</strong> - removes a parent object from an existing action.
3231 See the AddAction command for details on parent objects. This command is
3232 normally used after a building has loaded.<br>
3233 Syntax: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3234 <em>name, object</em></font><br>
3235 Example: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3236 myaction, Elevator 2</font><br>
3237 Example: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3238 myaction, Floors 2 to 5</font></p>
3239
3240 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3241
3242 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>at.
3243 GotoFloor</strong> - jumps the user to the specified floor. This command is
3244 normally used after a building has loaded.<br>
3245 Syntax: <font face="Courier New, Courier, mono" size="2">GotoFloor
3246 <em>floor</em></font><br>
3247 Example: <font face="Courier New, Courier, mono" size="2">GotoFloor 3</font></p>
3248
3249 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3250
3251 <p align="left"><strong>au. EndPoint</strong> - the EndPoint function
3252 calculates endpoint coordinates given a starting point, direction (angle in
3253 degrees), and distance.<br>
3254 Syntax:<font face="Courier New, Courier, mono" size="2"> endpoint(<em>startx,
3255 starty, angle, distance</em>)</font><br>
3256 Example: <font face="Courier New, Courier, mono" size="2">endpoint(-150, 150,
3257 180, 20)</font><br>
3258 Result: <font face="Courier New, Courier, mono" size="2">-150, 130</font></p>
3259
3260 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3261
3262 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>av.
3263 ListAltitudes</strong> - list the building's floor altitudes<br>
3264
3265 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3266
3267 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aw.
3268 ListTextures</strong> - list the loaded texture names (materials) and filenames<br>
3269
3270 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3271
3272 <p></p>
3273
3274 <p align="left"> </p>
3275
3276 <p align="left"><strong>8. END command</strong></p>
3277
3278 <p align="left">The End command tells the software to stop processing the
3279 current script and start the simulation. This is optional.<br>
3280 Example: <font face="Courier New, Courier, mono" size="2">&lt;end&gt;</font></p>
3281
3282 <p align="left"><br>
3283 <strong>9. BREAK command</strong></p>
3284
3285 <p align="left">The Break command triggers a break section in the script
3286 processor, and is used when running a debug build of the simulator, with a
3287 debugger attached. A breakpoint can be set on the associated line in
3288 fileio.cpp, and when this command is called, the debugger will hit the
3289 breakpoint.<br>
3290 Example: <font face="Courier New, Courier, mono"
3291 size="2">&lt;break&gt;</font></p>
3292
3293 <p align="left"> </p>
3294
3295 <p align="left"><strong><font size="+1"><a name="Functions"
3296 id="Functions"></a>9. Predefined Functions</font></strong></p>
3297
3298 <p align="left">There are a number of script functions provided by the
3299 simulator. Currently there's only a single script for elevator doors - see the
3300 Simple building (noted at the bottom of this page) for an example. These
3301 functions can be used by putting this line in your script:</p>
3302
3303 <p align="left"><font face="Courier New, Courier, mono" size="2">&lt;Include
3304 data/scripts/elevator_doors.txt&gt;</font></p>
3305
3306 <p align="left">You'll then be able to use some predefined door functions:</p>
3307
3308 <p align="left"><strong>1. elevdoor_single</strong> - creates a single-slide
3309 elevator door.<br>
3310 Syntax: <font face="Courier New, Courier, mono"
3311 size="2">elevdoor_single(<em>door_number, texture, side_texture, thickness,
3312 CenterX, CenterZ, width, height, door_direction, movement_direction, speed,
3313 is_shaft_door</em>)</font></p>
3314
3315 <p align="left"><em>Door_Direction</em> is either "left", "right", "front" or
3316 "back" and is the direction the doors face (torwards the outside of the
3317 elevator). <em>Movement_direction</em> is the direction the door should
3318 move.</p>
3319
3320 <p align="left"><strong>2. elevdoor_center</strong> - creates a center-open
3321 elevator door.<br>
3322 Syntax: <font face="Courier New, Courier, mono"
3323 size="2">elevdoor_center(<em>door_number, texture, side_texture, thickness,
3324 CenterX, CenterZ, width, height, door_direction, speed,
3325 is_shaft_door</em>)</font></p>
3326
3327 <p align="left"><strong>3. elevdoor_center_classic</strong> - creates a
3328 center-open elevator door with a partially open interior door.<br>
3329 Syntax: <font face="Courier New, Courier, mono"
3330 size="2">elevdoor_center_classic(<em>door_number, texture, side_texture,
3331 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3332 is_shaft_door</em>)</font></p>
3333
3334 <p align="left"><strong>4. elevdoor_dualspeed_left</strong> - creates a
3335 dual-speed door that opens to the left<br>
3336 Syntax: <font face="Courier New, Courier, mono"
3337 size="2">elevdoor_dualspeed_left(<em>door_number, texture, side_texture,
3338 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3339 is_shaft_door</em>)</font></p>
3340
3341 <p align="left"><strong>5. </strong><strong>elevdoor_dualspeed_right</strong> -
3342 creates a dual-speed door that opens to the right<br>
3343 Syntax: <font face="Courier New, Courier, mono"
3344 size="2">elevdoor_dualspeed_right(<em>door_number, texture, side_texture,
3345 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3346 is_shaft_door</em>)</font></p>
3347
3348 <p align="left"><strong>6. </strong><strong>elevdoor_center_dualspeed</strong>
3349 - creates a dual-speed center-open door<br>
3350 Syntax: <font face="Courier New, Courier, mono"
3351 size="2">elevdoor_center_dualspeed(<em>door_number, texture, side_texture,
3352 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3353 is_shaft_door</em>)</font></p>
3354
3355 <p align="left"> </p>
3356
3357 <p align="left"><strong><font size="+1"><a name="Example"></a>10. Small Example
3358 Building</font></strong></p>
3359
3360 <p align="left">To see an example of a small simplistic building in code, look
3361 at the Simple.bld file in Skyscraper's buildings directory. It's also available
3362 online <a
3363 href="http://cvs.tliquest.net/viewvc/*checkout*/skyscraper/buildings/Simple.bld">here</a>.</p>
3364
3365 <p align="left"> </p>
3366 </div>
3367 </body>
3368 </html>