OSDN Git Service

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