OSDN Git Service

Merged run_direction with run
[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.11<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">Actions are automatically created for call buttons, and here's available action command names that can be used for custom controls:</p>
1010
1011 <p align="left"><em>Off</em> (no action)<br>
1012 <em>Up</em> (press Up call button)<br>
1013 <em>Down</em> (press Down call button)<br>
1014 <em>FireOff</em> (set fire service phase 1 to Off for all elevators serviced by this call button)<br>
1015 <em>FireOn</em> (set fire service phase 1 to On for all elevators serviced by this call button)<br>
1016 <em>FireBypass</em> (set fire service phase 1 to Bypass for all elevators service by this call button)<br></p>
1017
1018 <p align="left"><strong>14. AddStairs</strong> - creates a custom staircase at
1019 the specified location.<br>
1020 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairs <em>number,
1021 name, texture, direction, CenterX, CenterZ, width, risersize, treadsize,
1022 num_stairs, voffset, tw, th</em></font><br>
1023 Example: <font face="Courier New, Courier, mono" size="2">AddStairs 1,
1024 TestStairs, Brick, left, 10, 15, 5, 0.5, 0.5, 10, 0, 0, 0</font></p>
1025
1026 <p align="left">The <em>direction</em> parameter specifies the direction the
1027 staircase faces (where the bottom step is), and so if a staircase goes up from
1028 left to right, the direction would be <em>left</em>. <em>Width</em> specifies
1029 the step width; <em>risersize</em> specifies the height of each step riser
1030 (vertical portion); <em>treadsize</em> specifies the length of each step
1031 tread/run (horizontal portion); <em>num_stairs</em> specifies the total number
1032 of steps to create (including the above landing platform, but not including the
1033 base platform). To calculate the length of the staircase, multiply
1034 <em>(num_stairs</em> - 1) with <em>treadsize</em>; in the above example, that
1035 would be 9 * 0.5. To determine the height of the staircase, multiply
1036 <em>num_stairs</em> with <em>risersize</em>. Note that the tread of the top
1037 step is not drawn (the top step is the landing platform); therefore for a
1038 staircase containing 10 steps, the total staircase width would be comprised of
1039 9 treads (which is why the length calculation used num_stairs minus 1).</p>
1040
1041 <p align="left"><strong>15. AddDoor</strong> - adds a textured door in the
1042 specified location, and performs a wall cut on that area (this must be called
1043 after the associated wall is created)<br>
1044 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoor <em>opensound,
1045 closesound, open, texturename, thickness</em>, <em>direction, speed,
1046 CenterX</em>, <em>CenterZ</em>, <em>width</em>, <em>height</em>,
1047 <em>voffset</em>, <em>tw</em>, <em>th<br>
1048 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddDoor
1049 , , False, DoorTexture, 0.2, 1, 0, -8.5, 0, 3.5, 8, 0, 1, 1</font></p>
1050
1051 <p align="left"><em>Direction</em> specifies the direction the door faces (the
1052 side in which the handle is on the left) and also the direction it opens. These
1053 are the values:<br>
1054 1 - faces left, opens left<br>
1055 2 - faces left, opens right<br>
1056 3 - faces right, opens right<br>
1057 4 - faces right, opens left<br>
1058 5 - faces front, opens front<br>
1059 6 - faces front, opens back<br>
1060 7 - faces back, opens back<br>
1061 8 - faces back, opens front</p>
1062
1063 <p align="left">The default door speed is 75; you can also specify 0 for the
1064 speed to use the system default. The <em>open</em> parameter determines if the
1065 door should be opened on start; default is false. Leave the sound fields blank
1066 for no sounds to be played.<br>
1067 </p>
1068
1069 <p align="left"><strong>16. AddStairsDoor</strong> - adds a textured door for
1070 the specified stairwell, in a location relative to the stairwell's center. This
1071 also performs a wall cut on that area (this must be called after the associated
1072 wall is created)<br>
1073 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsDoor
1074 <em>number, opensound, closesound, open, texturename, thickness</em>,
1075 <em>direction, speed, CenterX</em>, <em>CenterZ</em>, <em>width</em>,
1076 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font></p>
1077
1078 <p align="left"><em>Number</em> specifies the stairwell number.
1079 <em>Direction</em> specifies the direction the door faces and also the
1080 direction it opens. For values of this, look at the AddDoor command above.
1081 Leave the <em>sound</em> fields blank for no sounds to be played.</p>
1082
1083 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>17.
1084 AddShaftStdDoor</strong> - adds a standard textured door for the specified
1085 shaft, in a location relative to the shaft's center. This also performs a wall
1086 cut on that area (this must be called after the associated wall is created).
1087 This shouldn't be confused with the AddShaftDoor command, which creates
1088 elevator shaft doors.<br>
1089 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftStdDoor
1090 <em>number, opensound, closesound, open, texturename, thickness</em>,
1091 <em>direction, speed, CenterX</em>, <em>CenterZ</em>, <em>width</em>,
1092 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font><em><br>
1093 <br>
1094 Number</em> specifies the shaft number. <em>Direction</em> specifies the
1095 direction the door faces and also the direction it opens. For values of this,
1096 look at the AddDoor command above. Leave the <em>sound</em> fields blank for no
1097 sounds to be played.</p>
1098
1099 <p align="left"><strong>18. AddExternalDoor</strong> - same as the AddDoor command,
1100 but creates an external (global) door that is always visible.  With this command,
1101 the <em>voffset</em> parameter is relative of the floor's altitude, not base.<br>
1102 Syntax: <font face="Courier New, Courier, mono" size="2">AddExternalDoor <em>opensound,
1103 closesound, open, texturename, thickness</em>, <em>direction, speed,
1104 CenterX</em>, <em>CenterZ</em>, <em>width</em>, <em>height</em>,
1105 <em>voffset</em>, <em>tw</em>, <em>th<br>
1106 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddExternalDoor
1107 , , False, DoorTexture, 0.2, 1, 0, -8.5, 0, 3.5, 8, 0, 1, 1</font></p>
1108 </p>
1109
1110 <p align="left"><strong>19. AddDirectionalIndicator</strong> - creates a single
1111 elevator directional indicator/lantern on the current floor (similar to the
1112 CreateCallButtons command) <br>
1113 Syntax: <font face="Courier New, Courier, mono"
1114 size="2">AddDirectionalIndicator<em> Elevator:Car, Relative, ActiveDirection,
1115 Single, Vertical, BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit,
1116 DownTexture, DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth,
1117 BackHeight, ShowBack, tw, th<br>
1118 </em></font>Example: <font face="Courier New, Courier, mono"
1119 size="2"><em>AddDirectionalIndicator 1, true, false, false, true, Metal,
1120 UpLight, UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true,
1121 0, 0</em></font></p>
1122
1123 <p align="left">This command will create a directional indicator on the current
1124 floor (if <em>ActiveDirection</em> is false, then it'll only create it if the
1125 elevator serves that floor). It'll also automatically create the up and down
1126 lights depending on the floor.</p>
1127
1128 <p align="left"><em>Elevator:Car</em> specifies the elevator and car to create the
1129 indicators for.  The car value is optional, and if left out, either the car will be used that services the floor, or the first car will be used.
1130 For example, values can be "1" for Elevator 1 (uses default car or Car 1), or "1:1" for Elevator 1 Car 1.</p>
1131
1132 <p align="left"><em>Relative</em> determines if the X and Z coordinates are
1133 relative to the elevator's origin (center) or not.</p>
1134
1135 <p align="left"><em>ActiveDirection</em> determines if the indicator should
1136 continuously display the active elevator direction (true), or if it should show
1137 the elevator's direction for the current call (false, default)</p>
1138
1139 <p align="left"><em>Single</em> determines if a single indicator light should
1140 be created instead of two. If this is true, the unlit texture is specified in
1141 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
1142
1143 <p align="left"><em>Vertical</em> determines if the two lights should be
1144 vertically separated (true), or horizontally separated (false)</p>
1145
1146 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
1147 the lights</p>
1148
1149 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
1150 used for the lights themselves, and the "Lit" texures are the ones to show when
1151 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
1152
1153 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
1154 of the indicators</p>
1155
1156 <p align="left"><em>voffset</em> is the altitude offset that the object is
1157 above each floor</p>
1158
1159 <p align="left"><em>direction </em>determines the direction the indicators
1160 face:<br>
1161 'front' means they face towards the front of the building<br>
1162 'back' means they face towards the back of the building<br>
1163 'left' means they face left<br>
1164 'right' means they face right</p>
1165
1166 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
1167 height of the wall plate</p>
1168
1169 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
1170 and is either true or false</p>
1171
1172 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
1173 wall plate.</p>
1174
1175 <p align="left"><strong>20. AddShaftDoor</strong> - creates shaft elevator
1176 doors on the current floor only<br>
1177 Syntax: <font face="Courier New, Courier, mono"
1178 size="2">AddShaftDoor<em> elevator:car, number, lefttexture, righttexture</em>,
1179 <em>thickness, CenterX, CenterZ, voffset, tw, th</em></font><br>
1180 Syntax (with old SetShaftDoors command): <font
1181 face="Courier New, Courier, mono" size="2">AddShaftDoor<em> elevator, number,
1182 lefttexture, righttexture</em>, <em>tw, th</em></font></p>
1183
1184 <p align="left">The AddShaftDoor command creates working shaft elevator doors
1185 on the current floor only - the other command, <em>AddShaftDoors</em> (in the
1186 <em>elevator</em> section) creates all shaft doors in a single command. This
1187 command is useful for specifying different textures for shaft doors depending
1188 on the floor, and also for only creating shaft doors on one side if an elevator
1189 serves a specific floor. The <em>SetShaftDoors</em> command in the elevator
1190 section must be used before using this command. Parameters such as width,
1191 height, and direction are taken from the <em>AddDoors</em> command (so the
1192 regular elevator doors need to be created first). The <em>voffset</em>
1193 parameter allows you to create shaft doors at a different vertical position
1194 than the base of the floor, and the elevator will automatically stop according
1195 to the shaft door's voffset for that floor. These doors should be moved
1196 slightly away from the elevator car doors (to separate them both). Also, this
1197 command cuts any shaft walls that are within the door area (and so this must be
1198 called after the shaft walls are created). <em>Number</em> specifies the number
1199 of the door to create (related to the <em>Doors</em> command) - if the elevator
1200 only has one door, or if the <em>Doors</em> command was not used, specify 1
1201 here.  The <em>Elevator:Car</em> parameter specifies both the elevator and optionally
1202 elevator car to use (see the AddDirectionalIndicator command for more information).</p>
1203
1204 <p align="left"><strong>21. AddFloorIndicator</strong> - creates a floor
1205 indicator associated with a specific elevator<br>
1206 Syntax: <font face="Courier New, Courier, mono"
1207 size="2">AddFloorIndicator<em> elevator:car, relative, texture_prefix, direction,
1208 CenterX, CenterZ, width, height, voffset</em></font> </p>
1209
1210 <p align="left">The AddFloorIndicator command creates a floor indicator at the
1211 position specified by <em>CenterX</em> and <em>CenterZ</em>, associated with
1212 the elevator and car specified by <em>elevator:car</em> (see the AddDirectionalIndicator
1213 command). <em>Direction</em> is the
1214 direction the indicator faces, and can be either "left", "right", "front" or
1215 "back". <em>Relative</em> determines if the <em>CenterX</em> and
1216 <em>CenterZ</em> values are relative of the elevator's center or not. This
1217 command can be given multiple times to create multiple indicators.
1218 <em>Texture_prefix</em> is the base name of the texture to load when displaying
1219 a floor ID; for example if the indicator is on floor 3, and you specify a
1220 prefix of "Button", it'll load the "Button3" texture.</p>
1221
1222 <p align="left"><strong>22. Cut</strong> - performs a manual box cut on an area
1223 within the current floor<br>
1224 Syntax: <font face="Courier New, Courier, mono" size="2">Cut <em>x1, y1, z1,
1225 x2, y2, z2, cutwalls, cutfloors</em><br>
1226 </font>Example: <font face="Courier New, Courier, mono" size="2">Cut -5, -5,
1227 -5, 5, 5, 5, false, true</font></p>
1228
1229 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
1230 start and end coordinates of the box cut. The Y values are relative to the
1231 current floor's altitude. If <em>cutwalls</em> is true, the function will cut
1232 walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
1233
1234 <p align="left"><strong>23. CutAll</strong> - performs a manual box cut on all
1235 objects associated with the current floor (the level itself, interfloor,
1236 shafts, stairs and external)<br>
1237 Syntax: <font face="Courier New, Courier, mono" size="2">CutAll <em>x1, y1, z1,
1238 x2, y2, z2, cutwalls, cutfloors</em><br>
1239 </font>Example: <font face="Courier New, Courier, mono" size="2">CutAll -5, -5,
1240 -5, 5, 5, 5, false, true</font></p>
1241
1242 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
1243 start and end coordinates of the box cut. The Y values are relative to the
1244 current floor's altitude. If <em>cutwalls</em> is true, the function will cut
1245 walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
1246
1247 <p align="left"><strong>24. AddFillerWalls</strong> - helper function to add
1248 fillers around a door's cut location. When a door is created, the wall in it's
1249 location is cut to provide space; after the cut, the sides are open (if the
1250 wall has thickness) - this creates a covering wall on each side and a floor
1251 above the door frame to fill the area.<br>
1252 Syntax: <font face="Courier New, Courier, mono" size="2">AddFillerWalls
1253 <em>texture, thickness, CenterX, CenterZ, width, height, voffset, direction,
1254 tw, th, isexternal</em><br>
1255 </font>Example: <font face="Courier New, Courier, mono" size="2">AddFillerWalls
1256 ConnectionWall, 0.5, -10, 0, 3.5, 8, 0, true, 0, 0, false</font></p>
1257
1258 <p align="left">The parameters in this function are similar to the related
1259 door's parameters. <em>Direction</em> is either true if the door faces the
1260 front/back (width is along the X axis), or false if the door faces left/right
1261 (width is along the Z axis).<br>
1262 The <em>isexternal</em> parameter is the same as with the AddWall command, and
1263 if it is true, the voffset value is relative of the floor's altitude, not base.</p>
1264
1265 <p align="left"><strong>25. AddSound</strong> - creates a user-defined sound at
1266 the specified position<br>
1267 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
1268 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
1269 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
1270 direction_x, direction_y, direction_z]</em></font><br>
1271 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
1272 sound.wav, 10, 100, 5, true<br>
1273 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
1274 MySound, sound.wav, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
1275 0</font></p>
1276
1277 <p align="left">For information on the parameters, see the AddSound command in
1278 the Global Commands section. The only difference here is that the Y value is relative
1279 of the floor's base (altitude plus interfloor height). <em>Loop</em> specifies
1280 if the sound should loop and play on startup.</p>
1281
1282 <p align="left"><strong>26. AddShaftDoorComponent</strong> - creates a single
1283 shaft door component, used for creating custom door styles<br>
1284 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoorComponent
1285 <em>elevator:car, number, name, texture, sidetexture, thickness, direction,
1286 openspeed, closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
1287 side_th</em></font></p>
1288
1289 <p align="left">This command is almost identical to the AddDoorComponent
1290 command (in the elevator section below - see that for more information), except
1291 that it creates shaft doors. Use the FinishShaftDoor command after creating the
1292 components. The components don't need to line up with the floor's base; the
1293 elevator will automatically stop at the base of the shaft door for each floor.
1294 This command replaces the AddShaftDoor command.  The <em>Elevator:Car</em> parameter
1295 specifies both the elevator and optionally elevator car to use
1296 (see the AddDirectionalIndicator command for more information).</p>
1297
1298 <p align="left"><strong>27. FinishShaftDoor</strong> - finishes shaft door
1299 creation - use this after all related AddShaftDoorComponent commands are used,
1300 or specify it without the AddShaftDoorComponent commands if you're creating a
1301 manual shaft door.<br>
1302 Syntax: <font face="Courier New, Courier, mono"
1303 size="2">FinishShaftDoor<em> elevator:car, number[, door_walls, track_walls]</em></font></p>
1304
1305 <p align="left">This command is almost identical to the FinishDoors command (in
1306 the elevator section below - see that for more information) except that it's
1307 used for finishing a shaft door.</p>
1308
1309 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>28.
1310 AddModel</strong> - adds a 3D model to the floor. If a filename is specified, the model's
1311 textures/materials must be defined in a separate ".material" file, and a
1312 separate collider mesh ".collider" will be loaded. In that situation, if a collider mesh isn't
1313 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>
1314 Syntax: <font face="Courier New, Courier, mono" size="2">AddModel<em> name,
1315 filename, center, CenterX, CenterY, CenterZ, RotationX, RotationY, RotationZ,
1316 MaxRenderDistance, ScaleMultiplier, EnablePhysics, Restitution, Friction,
1317 Mass</em><em><br>
1318 </em></font>Example 1:<font face="Courier New, Courier, mono" size="2"> AddModel
1319 MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font><br>
1320 Example 2:<font face="Courier New, Courier, mono" size="2"> AddModel MyModel,
1321 cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, true, 0.1, 0.5, 0.1</font><br>
1322 Example 3:<font face="Courier New, Courier, mono" size="2"> AddModel MyModel,
1323 , false, 0, 0, 0, 0, 0, 0, 0, 1, true, 0.1, 0.5, 0.1</font></p>
1324
1325 <p></p>
1326
1327 <p align="left">The <em>Center</em> value is either true or false, and
1328 determines if the loaded model should be automatically centered, otherwise the
1329 exact mesh positioning in the model file will be used. The <em>CenterY</em>
1330 value is relative to the current floor's base. <em>MaxRenderDistance</em>
1331 determines the maximum distance in feet that the object will be shown (0 means
1332 unlimited). <em>ScaleMultiplier</em> allows you to change the size of the
1333 object during the load - for example, set to 2 to double the size. Model files are
1334 in the OGRE native mesh format. In the example, the material/texture file is
1335 cube.material, and the optional collider mesh file is cube.collider.
1336 <em>EnablePhysics</em> enables Bullet physics on the object (physics will only
1337 work if you don't provide a collider mesh), and <em>Restitution</em>,
1338 <em>Friction</em> and <em>Mass</em> determine the physical properties of the
1339 object.</p>
1340
1341 <p align="left"><strong>29. AddStairsModel</strong> - adds a 3D model to the
1342 specified stairwell, on the current floor. See the AddModel command above for
1343 parameter information.<br>
1344 Syntax: <font face="Courier New, Courier, mono"
1345 size="2">AddStairsModel<em> number, name, filename, center, CenterX, CenterY,
1346 CenterZ, RotationX, RotationY, RotationZ, MaxRenderDistance, ScaleMultiplier,
1347 EnablePhysics, Restitution, Friction, Mass</em><em><br>
1348 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
1349 1, MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font></p>
1350
1351 <p align="left">The <em>CenterY</em> value is relative to the current floor's
1352 altitude. </p>
1353
1354 <p align="left"><strong>30. AddShaftModel</strong> - adds a 3D model to the
1355 specified shaft, on the current floor. See the AddModel command above for
1356 parameter information.<br>
1357 Syntax: <font face="Courier New, Courier, mono"
1358 size="2">AddShaftModel<em> number, name, filename, center, CenterX, CenterY,
1359 CenterZ, RotationX, RotationY, RotationZ, MaxRenderDistance, ScaleMultiplier,
1360 EnablePhysics, Restitution, Friction, Mass</em><em><br>
1361 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddModel
1362 1, MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font></p>
1363
1364 <p align="left">The <em>CenterY</em> value is relative to the current floor's
1365 altitude. </p>
1366
1367 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>31.
1368 AddActionControl</strong> - creates a custom control that uses a specific
1369 action defined by AddAction.<br>
1370 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
1371 <em>name, sound, direction, centerx, centerz, width, height, voffset,
1372 selection_position, action_name(s), texture_name(s)<br>
1373 </em></font>Example: <font face="Courier New, Courier, mono"
1374 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
1375 1, UndoMyAction, MyAction, Touch, TouchLit<br>
1376 </font><br>
1377 AddActionControl command creates an advanced control similar to elevator button
1378 panel controls, but assigned to an action created with the AddAction command.
1379 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
1380 to specify a list of actions, and a list of textures to go along with those
1381 actions. There needs to be a texture for every action; if you specify 3 actions
1382 and only 2 textures, you will get an error. The control starts up in the first
1383 action, and switches to the next actions in sequence when it's clicked.
1384 <em>Direction</em> is the direction the control itself will face in 3D space
1385 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1386 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>
1387
1388 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>32.
1389 AddShaftActionControl</strong> - creates a custom control in a specified shaft
1390 that uses a specific action defined by AddAction.<br>
1391 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftActionControl
1392 <em>number, name, sound, direction, centerx, centerz, width, height, voffset,
1393 selection_position, action_name(s), texture_name(s)<br>
1394 </em></font>Example: <font face="Courier New, Courier, mono"
1395 size="2">AddShaftActionControl 1, MyControl, switch.wav, front, -10, 10, 1.5,
1396 1.5, 4, 1, UndoMyAction, MyAction, Touch, TouchLit<br>
1397 </font><br>
1398 This command creates an advanced control similar to elevator car button panel
1399 controls, but assigned to an action created with the AddAction command. The
1400 <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you to
1401 specify a list of actions, and a list of textures to go along with those
1402 actions. There needs to be a texture for every action; if you specify 3 actions
1403 and only 2 textures, you will get an error. The control starts up in the first
1404 action, and switches to the next actions in sequence when it's clicked.
1405 <em>Direction</em> is the direction the control itself will face in 3D space
1406 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1407 Leave the <em>sound</em> field blank for no sound to be
1408 played. <em>Selection_position</em> is the starting selection position, which
1409 is normally 1.</p>
1410
1411 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>33.
1412 AddStairsActionControl</strong> - creates a custom control in a specified
1413 stairwell that uses a specific action defined by AddAction.<br>
1414 Syntax: <font face="Courier New, Courier, mono" size="2">AddStairsActionControl
1415 <em>number, name, sound, direction, centerx, centerz, width, height, voffset,
1416 selection_position, action_name(s), texture_name(s)<br>
1417 </em></font>Example: <font face="Courier New, Courier, mono"
1418 size="2">AddStairsActionControl 1, MyControl, switch.wav, front, -10, 10, 1.5,
1419 1.5, 4, 1, UndoMyAction, MyAction, Touch, TouchLit<br>
1420 </font><br>
1421 This command creates an advanced control similar to elevator button panel
1422 controls, but assigned to an action created with the AddAction command. The
1423 <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you to
1424 specify a list of actions, and a list of textures to go along with those
1425 actions. There needs to be a texture for every action; if you specify 3 actions
1426 and only 2 textures, you will get an error. The control starts up in the first
1427 action, and switches to the next actions in sequence when it's clicked.
1428 <em>Direction</em> is the direction the control itself will face in 3D space
1429 (front, left, right, back). <em>Voffset</em> is relative of the floor's base.
1430 Leave the <em>sound</em> field blank for no sound to be
1431 played. <em>Selection_position</em> is the starting selection position, which is
1432 normally 1.</p>
1433
1434 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>34.
1435 AddTrigger</strong> - creates a trigger that is used to signal an action when
1436 the user's camera enters or leaves the defined area.<br>
1437 Syntax: <font face="Courier New, Courier, mono" size="2">AddTrigger <em>name,
1438 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
1439 </em></font>Example:<font face="Courier New, Courier, mono"
1440 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
1441 UndoMyAction, MyAction</font><br>
1442 <br>
1443 AddTrigger creates a trigger similar to action controls (AddActionControl) and
1444 elevator car controls. The <em>action_names(s)</em> parameter allows you to specify
1445 a list of actions that this trigger will call when the camera enters or exits
1446 the area. The trigger starts in the first action, and will switch to each
1447 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
1448 <em>Z</em> parameters specify the 3D box that defines the trigger area. Y is
1449 relative of the floor's base. Leave the <em>sound</em> field blank for no sound
1450 to be played.</p>
1451
1452 <p align="left"><strong>35. AddRevolvingDoor</strong> - adds a textured revolving door in the
1453 specified location.<br>
1454 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoor <em>sound,
1455 texturename, thickness</em>, <em>clockwise, segments, speed, rotation,
1456 CenterX</em>, <em>CenterZ</em>, <em>width</em>, <em>height</em>,
1457 <em>voffset</em>, <em>tw</em>, <em>th, external<br>
1458 </em></font>Example:<font face="Courier New, Courier, mono" size="2"> AddRevolvingDoor
1459 , DoorTexture, 0.2, false, 4, 0.2, -8.5, 0, 3.5, 8, 0, 1, 1, false</font></p>
1460
1461 <p align="left"><em>Clockwise</em> determines the direction the door rotates.
1462 <em>Segments</em> determines how many door segments to create (2-4).
1463 Leave the sound field blank for no sounds to be played.<br>
1464 <em>Rotation</em> determines the starting rotation of the door.
1465 </p>
1466
1467 <p align="left"><strong></strong></p>
1468
1469 <br>
1470
1471 <p align="left"><strong><font size="+1"><a name="Elevator"></a>6. The
1472 <em>Elevator</em> Section</font></strong></p>
1473
1474 <p align="left">The <em>Elevator</em> section allows you to create elevators
1475 for your building. Elevators are numbered, starting with 1.</p>
1476
1477 <p align="left">Each elevator is created with a single default car, Car 1.
1478 Car-specific parameters and commands are listed in the <em>Car</em> section, but can
1479 also be specified in this section, if an elevator only has a single car,
1480 or if you're referring to Car 1.</p>
1481
1482 <p align="left">The section headers and footers are similar to the ones in the
1483 <em>Floor</em> section.<br>
1484 To specify a single elevator, you would type something like:<br>
1485 <font face="Courier New, Courier, mono" size="2">&lt;Elevator 1&gt;</font><br>
1486 and end it with:<br>
1487 <font face="Courier New, Courier, mono" size="2">&lt;EndElevator&gt;</font><br>
1488 <br>
1489 For a range of elevators, you would use something like:<br>
1490 <font face="Courier New, Courier, mono" size="2">&lt;Elevators 2 to
1491 10&gt;</font><br>
1492 and end with:<br>
1493 <font face="Courier New, Courier, mono" size="2">&lt;EndElevators&gt;</font></p>
1494
1495 <p align="left">When creating a new elevator car, the required values for each are
1496 the <em>Speed</em>, <em>Acceleration</em>, <em>Deceleration</em>, <em>AssignedShaft</em>, and <em>ServicedFloors</em> parameters and the <em>CreateElevator</em> command.</p>
1497
1498 <p align="left"><strong>Variables:</strong></p>
1499
1500 <p align="left"><font face="Courier New, Courier, mono"
1501 size="2"><strong>%elevator%</strong></font> - number of the current elevator</p>
1502
1503 <p align="left"><strong>Parameters</strong>:</p>
1504
1505 <p align="left"><strong>1. Name</strong> - sets the name of the elevator<br>
1506 Example: <font face="Courier New, Courier, mono" size="2">Name = Service
1507 Elevator</font></p>
1508
1509 <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>
1510 Example: <font face="Courier New, Courier, mono" size="2">Type = Express</font></p>
1511
1512 <p align="left"><strong>3. Speed</strong> - maximum speed of the elevator, in
1513 feet per second<br>
1514 Example: <font face="Courier New, Courier, mono" size="2">Speed = 20</font></p>
1515
1516 <p align="left"><strong>4. Acceleration</strong> - acceleration speed of the
1517 elevator, in feet per second<br>
1518 Example: <font face="Courier New, Courier, mono" size="2">Acceleration =
1519 0.015</font></p>
1520
1521 <p align="left"><strong>5. Deceleration</strong> - deceleration speed of the
1522 elevator, in feet per second<br>
1523 Example: <font face="Courier New, Courier, mono" size="2">Deceleration =
1524 0.0075</font></p>
1525
1526 <p align="left"><strong>6. AssignedShaft</strong> - the shaft number this
1527 elevator is in<br>
1528 Example: <font face="Courier New, Courier, mono" size="2">AssignedShaft =
1529 1</font></p>
1530
1531 <p align="left"><strong>7. MotorStartSound, MotorUpStartSound,
1532 MotorDownStartSound</strong> - the sound file to play when the elevator motor
1533 starts moving/speeds up (sets both directions). Default is
1534 <em>elevstart.wav</em>. Leave the filename field blank for no sound. The first
1535 command specifies both up and down sounds, while the others are for either
1536 upwards movement or downwards movement.<br>
1537 Example: <font face="Courier New, Courier, mono" size="2">MotorStartSound =
1538 start.wav</font></p>
1539
1540 <p align="left"><strong>8. MotorRunSound, MotorUpRunSound,
1541 MotorDownRunSound</strong> - the sound file to play while the elevator motor is
1542 running (sets both directions). This file is automatically looped by the
1543 simulator. Default is <em>elevmove.wav</em>. Leave the filename field blank for
1544 no sound. The first command specifies both up and down sounds, while the others
1545 are for either upwards movement or downwards movement.<br>
1546 Example: <font face="Courier New, Courier, mono" size="2">MotorRunSound =
1547 run.wav</font></p>
1548
1549 <p align="left"><strong>9. MotorStopSound, MotorUpStopSound,
1550 MotorDownStopSound</strong> - the sound file to play when the elevator motor
1551 slows down and stops (sets both directions). Default is <em>elevstop.wav</em>.
1552 Leave the filename field blank for no sound. The first command specifies both
1553 up and down sounds, while the others are for either upwards movement or
1554 downwards movement.<br>
1555 Example: <font face="Courier New, Courier, mono" size="2">MotorStopSound =
1556 stop.wav</font></p>
1557
1558 <p align="left"><strong>10. MotorIdleSound</strong> - the sound file to play
1559 when the elevator motor is idling. There is no default yet. Leave the filename
1560 field blank for no sound. <br>
1561 Example: <font face="Courier New, Courier, mono" size="2">MotorIdleSound =
1562 idle.wav</font></p>
1563
1564 <p align="left"><strong>11. FloorSkipText</strong> - sets the text that will be
1565 shown in the floor indicator when passing non-serviced floors. The texture for
1566 this must be loaded for it to show (and will start with the related indicator's
1567 texture prefix) - of you set this to EX for example, and the indicator's
1568 texture prefix is "Button", the texture it'll load will be ButtonEX.jpg. Common
1569 values for this are EZ, X, and EX (which stand for Express Zone).<br>
1570 Example: <font face="Courier New, Courier, mono" size="2">FloorSkipText = EZ
1571 </font></p>
1572
1573 <p align="left"><strong>12. RecallFloor</strong> - sets the floor the elevator
1574 will recall to during fire service phase 1 mode. Default is the lowest serviced
1575 floor. <br>
1576 Example: <font face="Courier New, Courier, mono" size="2">RecallFloor =
1577 5</font></p>
1578
1579 <p align="left"><strong>13. AlternateRecallFloor</strong> - sets the alternate
1580 floor the elevator will recall to during fire service phase 1 mode. Default is
1581 the highest serviced floor. <br>
1582 Example: <font face="Courier New, Courier, mono" size="2">AlternateRecallFloor
1583 = 6</font></p>
1584
1585 <p align="left"><strong>14. ACP</strong> - enables ACP (Anti-Crime Protection)
1586 mode<br>
1587 Example: <font face="Courier New, Courier, mono" size="2">ACP = true</font></p>
1588
1589 <p align="left"><strong>15. ACPFloor</strong> - sets the floor the elevator
1590 will stop at while in ACP mode. Default is the lowest serviced floor. <br>
1591 Example: <font face="Courier New, Courier, mono" size="2">ACPFloor =
1592 5</font></p>
1593
1594 <p align="left"><strong>16. MotorPosition</strong> - sets the position of the
1595 motor sound emitter; if this command is not specified, it'll be placed at the
1596 base (altitude + interfloor) of the highest floor in the corresponding shaft.
1597 The X and Z values are relative of the elevator center.<br>
1598 Syntax: <font face="Courier New, Courier, mono" size="2">MotorPosition = <em>x,
1599 y, z</em><br>
1600 </font>Example: <font face="Courier New, Courier, mono" size="2">MotorPosition
1601 = 0, 100, 0</font></p>
1602
1603 <p align="left"><strong>17. QueueResets</strong> - set this to true if you want
1604 the elevator to reset the related queue (up or down) after it reaches the last
1605 valid entry. If the elevator is moving up for example with this setting on, and
1606 you press buttons for floors below you, the elevator will remove those entries
1607 after it reaches the highest selected floor. The elevator will only be
1608 available for hall calls in the active queue direction.<br>
1609 Example: <font face="Courier New, Courier, mono" size="2">QueueResets =
1610 true</font></p>
1611
1612 <p align="left"><strong>18. LimitQueue</strong> - set this to true to only
1613 allow floor selections in the same direction as the active elevator queue
1614 direction to be placed. For example, if the elevator is moving up, and a button
1615 is pressed for a lower floor, this will prevent that from being queued. The
1616 elevator will only be available for hall calls in the active queue
1617 direction.<br>
1618 Example: <font face="Courier New, Courier, mono" size="2">LimitQueue =
1619 true</font></p>
1620
1621 <p align="left"><strong>19. UpPeak</strong> - enables up peak mode for this
1622 elevator.<br>
1623 Example: <font face="Courier New, Courier, mono" size="2">UpPeak =
1624 true</font></p>
1625
1626 <p align="left"><strong>20. DownPeak</strong> - enables down peak mode for this
1627 elevator.<br>
1628 Example: <font face="Courier New, Courier, mono" size="2">DownPeak =
1629 true</font></p>
1630
1631 <p align="left"><strong>21. InspectionService</strong> - enables inspection
1632 service mode for this elevator.<br>
1633 Example: <font face="Courier New, Courier, mono" size="2">InspectionService =
1634 true</font></p>
1635
1636 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>22.
1637 InspectionSpeed</strong> - speed multiplier for inspection service (if set to
1638 0.6, would be 60% of elevator speed)<br>
1639 Syntax: <font face="Courier New, Courier, mono" size="2">InspectionSpeed =
1640 <em>multiplier</em></font></p>
1641
1642 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>23.
1643 Parking</strong> - enables automatic elevator parking. If this option is used,
1644 the elevator will automatically send itself to the specified parking floor
1645 after the number of seconds specified in <em>delay</em>. <br>
1646 Syntax: <font face="Courier New, Courier, mono" size="2">Parking = <em>floor,
1647 delay</em></font></p>
1648
1649 <p align="left"><strong>24. LevelingSpeed</strong> - elevator's leveling speed.
1650 Default is 0.2<br>
1651 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingSpeed =
1652 <em>speed</em></font></p>
1653
1654 <p align="left"><strong>25. LevelingOffset</strong> - distance in feet from the
1655 destination floor that the elevator will switch into leveling mode. Default is
1656 0.5<br>
1657 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingOffset =
1658 <em>distance</em></font></p>
1659
1660 <p align="left"><strong>26. LevelingOpen</strong> - distance in feet from the
1661 destination floor that the elevator will open the doors. Default is 0.<br>
1662 Syntax: <font face="Courier New, Courier, mono" size="2">LevelingOpen =
1663 <em>distance</em></font></p>
1664
1665 <p align="left"><strong>27. NotifyEarly</strong> - changes behavior of arrival
1666 notifications (chime, lighting of directional indicator, and floor announcement
1667 sound). 0 is the default and notifies when the elevator stops on the floor. 1
1668 notifies when the elevator starts the leveling process, and 2 notifies when the
1669 elevator starts decelerating.<br>
1670 Syntax: <font face="Courier New, Courier, mono" size="2">NotifyEarly =
1671 <em>value</em></font></p>
1672
1673 <p align="left"><strong>28. DepartureDelay</strong> - sets the time in seconds
1674 that the elevator waits before proceeding to the next floor. Default is 0.<br>
1675 Syntax: <font face="Courier New, Courier, mono" size="2">DepartureDelay =
1676 <em>1</em> </font></p>
1677
1678 <p align="left"><strong>29. ArrivalDelay</strong> - sets the time in seconds
1679 that the elevator waits before opening the doors after arriving at a floor. The
1680 default is 0. Note that a value greater than 0 will switch off the LevelingOpen
1681 setting.<br>
1682 Syntax: <font face="Courier New, Courier, mono" size="2">ArrivalDelay =
1683 <em>0.5</em></font></p>
1684
1685 <p align="left"><strong>30. FireService1</strong> - sets the fire service phase
1686 1 mode that the elevator will start with. Default is 0. Values are 0 for off, 1
1687 for on, 2 for bypass.<br>
1688 Syntax: <font face="Courier New, Courier, mono" size="2">FireService1 =
1689 2</font></p>
1690
1691 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>31.
1692 AutoDoors</strong> - if this is set to true, the elevator doors will
1693 automatically open if instructed (for example, when arriving at a floor), and
1694 will refuse to open if between floors. Set to false for manual elevators. The
1695 default is true.<br>
1696 Syntax: <font face="Courier New, Courier, mono" size="2">AutoDoors =
1697 false</font></p>
1698
1699 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>32.
1700 OpenOnStart</strong> - if this is set to true, the elevator doors will
1701 automatically open on startup. The default is false.<br>
1702 Syntax: <font face="Courier New, Courier, mono" size="2">OpenOnStart =
1703 false</font></p>
1704
1705 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>33.
1706 Interlocks</strong> - if this is set to true, the elevator doors will remain
1707 locked while the elevator is moving, will refuse to open unless the elevator is
1708 within a landing zone, and the elevator will not move unless the doors are
1709 closed. The default is true.<br>
1710 Syntax: <font face="Courier New, Courier, mono" size="2">Interlocks =
1711 false</font></p>
1712
1713 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>34.
1714 FloorHold</strong> - if this is set to true, the user must hold down the floor
1715 button in order to move to the desired floor. When the button is released, the
1716 elevator will immediately stop. This is used to mimic a modern manual elevator
1717 (platform lift). The default is false.<br>
1718 Syntax: <font face="Courier New, Courier, mono" size="2">FloorHold =
1719 true</font></p>
1720
1721 <p align="left"><strong>35. MotorEmergencyStopSound</strong> - the sound file to play
1722 for the elevator motor when an emergency stop is initiated.
1723 Leave the filename field blank to use the normal motor stop sound, if specified.
1724 The default is <em>emergstop.wav</em><br>
1725 Example: <font face="Courier New, Courier, mono" size="2">MotorEmergencyStopSound =
1726 emergstop.wav</font></p>
1727
1728 <p align="left"><strong>36. EmergencyStopSpeed</strong> - the speed multiplier to
1729 use for an emergency stop.  A value of 3, the default, would mean 3 times the
1730 normal deceleration rate.<br>
1731 Example: <font face="Courier New, Courier, mono" size="2">EmergencyStopSpeed =
1732 2.5</font></p>
1733
1734 <p align="left"><strong>37. ChimeOnArrival</strong> - if set to true, the elevator
1735 will always chime when arriving to a floor.  If false (the default), the elevator
1736 will only chime when responding to a hall call.<br>
1737 Example: <font face="Courier New, Courier, mono" size="2">ChimeOnArrival =
1738 true</font></p>
1739
1740 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>38.
1741 ReOpen</strong> - if this is set to true, if the elevator is idle, the doors
1742 will reopen if the same floor is selected. The default is true.<br>
1743 Syntax: <font face="Courier New, Courier, mono" size="2">ReOpen =
1744 false</font></p>
1745
1746 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>39.
1747 HoistwayAccessHold</strong> - if this is set to true, the control switch
1748 in Hoistway Access mode needs to be held in the direction position, for the elevator to move.  The default is true.<br>
1749 Syntax: <font face="Courier New, Courier, mono" size="2">HoistwayAccessHold =
1750 false</font></p>
1751
1752 <br>
1753
1754 <p align="left"><strong>Commands:</strong></p>
1755
1756 <p align="left"><strong>1. CreateElevator</strong> - creates an elevator at the
1757 specified location<br>
1758 Syntax: <font face="Courier New, Courier, mono" size="2">CreateElevator
1759 <em>relative, x</em>, <em>z</em>, <em>floor<br>
1760 </em></font>Example:<font face="Courier New, Courier, mono" size="2"><em></em>
1761 CreateElevator false, 0, 10, 0</font></p>
1762
1763 <p align="left"><em>Relative </em>determines if the coordinates are relative to
1764 the shaft center, or if they're absolute, <em>X</em> and <em>Z </em>are the
1765 coordinates to place the center of the elevator at, and <em>Floor</em> is the
1766 floor to place the elevator on.</p>
1767
1768 <p align="left"></p>
1769
1770 <br>
1771
1772 <p align="left"><strong><font size="+1"><a name="Car"></a>7. The
1773 <em>Car</em> (Elevator) Section</font></strong></p>
1774
1775 <p align="left">In order to support multi-deck elevators, each elevator car
1776 can be defined separately.  The <em>Car</em> section is a subsection of the <em>Elevator</em>
1777 section, and allows you to create additional cars for your elevator.  These are
1778 also numbered, starting with 1.</p>
1779
1780 <p align="left">To create additional cars, this section is normally placed right after
1781 the elevator's CreateElevator command.</p>
1782
1783 <p align="left">The section headers and footers are similar to the ones in the
1784 <em>Elevator</em> section.<br>
1785 To specify a single car, you would type something like:<br>
1786 <font face="Courier New, Courier, mono" size="2">&lt;Car 2&gt;</font><br>
1787 and end it with:<br>
1788 <font face="Courier New, Courier, mono" size="2">&lt;EndCar&gt;</font><br>
1789 <br>
1790 For a range of elevators, you would use something like:<br>
1791 <font face="Courier New, Courier, mono" size="2">&lt;Cars 1 to
1792 2&gt;</font><br>
1793 and end with:<br>
1794 <font face="Courier New, Courier, mono" size="2">&lt;EndCars&gt;</font></p>
1795
1796 <p align="left">When creating a new elevator car, the required values for each are
1797 the <em>ServicedFloors</em> parameter and the <em>CreateCar</em> command.</p>
1798
1799 <p align="left"><strong>Variables:</strong></p>
1800
1801 <p align="left"><font face="Courier New, Courier, mono"
1802 size="2"><strong>%elevator%</strong></font> - number of the current elevator<br>
1803 <font face="Courier New, Courier, mono"
1804 size="2"><strong>%car%</strong></font> - number of the current car</p>
1805
1806 <p align="left"><strong>Parameters</strong>:</p>
1807
1808 <p align="left"><strong>1. Name</strong> - sets the name of the car<br>
1809 Example: <font face="Courier New, Courier, mono" size="2">Name = Lower Car
1810 </font></p>
1811
1812 <p align="left"><strong>2. OpenSpeed</strong> - open/close speed of the
1813 elevator doors. This must be specified after the CreateCar command.<br>
1814 Syntax: <font face="Courier New, Courier, mono" size="2">OpenSpeed
1815 <em>doornumber</em> = <em>value</em></font><br>
1816 Example: <font face="Courier New, Courier, mono" size="2">OpenSpeed 1 =
1817 0.2</font></p>
1818
1819 <p align="left"><strong>3. SlowSpeed</strong> - open/close speed multiplier of
1820 the elevator doors used for slow movement, usually nudge mode. The default is
1821 0.5, which ends up being half of the door's speed value. This must be specified
1822 after the CreateCar command.<br>
1823 Syntax: <font face="Courier New, Courier, mono" size="2">SlowSpeed
1824 <em>doornumber</em> = <em>value</em></font><br>
1825 Example: <font face="Courier New, Courier, mono" size="2">SlowSpeed 1 =
1826 0.2</font></p>
1827
1828 <p align="left"><strong>4. ManualSpeed</strong> - open/close speed multiplier
1829 of the elevator doors used for manual movement. The default is 0.2. This must
1830 be specified after the CreateCar command.<br>
1831 Syntax: <font face="Courier New, Courier, mono" size="2">ManualSpeed
1832 <em>doornumber</em> = <em>value</em></font><br>
1833 Example: <font face="Courier New, Courier, mono" size="2">ManualSpeed 1 =
1834 0.2</font></p>
1835
1836 <p align="left"><strong>5. ServicedFloors</strong> - a comma-separated list of
1837 floors this elevator car services. Ranges can also be specified by putting a "-"
1838 between the numbers.  Please note that each car must serve different floors.<br>
1839 Example: <font face="Courier New, Courier, mono" size="2">ServicedFloors = 0,
1840 5, 6, 7-30, 31</font></p>
1841
1842 <p align="left"><strong>6. DoorTimer</strong> - the length of time (in
1843 milliseconds) that the elevator doors should stay open before automatically
1844 closing. Specify 0 to disable. The default is 5000, or 5 seconds. This must be
1845 specified after the CreateCar command.<br>
1846 Syntax: <font face="Courier New, Courier, mono" size="2">DoorTimer
1847 <em>doornumber</em> = <em>value</em></font><br>
1848 Example: <font face="Courier New, Courier, mono" size="2">DoorTimer 1 =
1849 10000</font></p>
1850
1851 <p align="left"><strong>7. QuickClose</strong> - the length of time (in
1852 milliseconds) that the elevator doors should stay open before automatically
1853 closing, in quick-close mode. Specify 0 to disable. The default is 3000, or 3
1854 seconds. This must be specified after the CreateCar command.<br>
1855 Syntax: <font face="Courier New, Courier, mono" size="2">QuickClose
1856 <em>doornumber</em> = <em>value</em></font><br>
1857 Example: <font face="Courier New, Courier, mono" size="2">QuickClose 1 =
1858 10000</font></p>
1859
1860 <p align="left"><strong>8. NudgeTimer</strong> - the length of time (in
1861 seconds) that the doors have to remain open before the elevator car activates nudge
1862 mode for the related door. Specify 0 to disable. The default is 30 seconds.
1863 This must be specified after the CreateCar command.<br>
1864 Syntax: <font face="Courier New, Courier, mono" size="2">NudgeTimer
1865 <em>doornumber</em> = <em>value</em></font><br>
1866 Example: <font face="Courier New, Courier, mono" size="2">NudgeTimer 1 =
1867 10</font></p>
1868
1869 <p align="left"><strong>9. OpenSound</strong> - the sound file to play when
1870 the elevator doors open. Default is <em>elevatoropen.wav</em>. Leave the
1871 filename field blank for no sound. This must be specified after the
1872 CreateCar command.<br>
1873 Syntax: <font face="Courier New, Courier, mono" size="2">OpenSound
1874 <em>doornumber</em> = <em>filename</em></font><br>
1875 Example: <font face="Courier New, Courier, mono" size="2">OpenSound 1 =
1876 open.wav</font></p>
1877
1878 <p align="left"><strong>10. CloseSound</strong> - the sound file to play when
1879 the elevator doors close. Default is <em>elevatorclose.wav</em>. Leave the
1880 filename field blank for no sound. This must be specified after the
1881 CreateCar command.<br>
1882 Syntax: <font face="Courier New, Courier, mono" size="2">CloseSound
1883 <em>doornumber</em> = <em>filename</em></font><br>
1884 Example: <font face="Courier New, Courier, mono" size="2">CloseSound 1 =
1885 close.wav</font></p>
1886
1887 <p align="left"><strong>11. CarStartSound, CarUpStartSound,
1888 CarDownStartSound</strong> - the sound file to play when the elevator car starts
1889 moving/speeds up. Leave the filename field blank for no sound. By default no
1890 sound is played. The first command specifies both up and down sounds, while the
1891 others are for either upwards movement or downwards movement.<br>
1892 Example: <font face="Courier New, Courier, mono" size="2">CarStartSound =
1893 start.wav</font></p>
1894
1895 <p align="left"><strong>12. CarMoveSound, CarUpMoveSound,
1896 CarDownMoveSound</strong> - the sound file to play while the elevator car is
1897 moving. This file is automatically looped by the simulator. By default no sound
1898 is played. Leave the filename field blank for no sound. The first command
1899 specifies both up and down sounds, while the others are for either upwards
1900 movement or downwards movement.<br>
1901 Example: <font face="Courier New, Courier, mono" size="2">CarMoveSound =
1902 move.wav</font></p>
1903
1904 <p align="left"><strong>13. CarStopSound, CarUpStopSound,
1905 CarDownStopSound</strong> - the sound file to play when the elevator car slows down
1906 and stops. By default no sound is played. Leave the filename field blank for no
1907 sound. The first command specifies both up and down sounds, while the others
1908 are for either upwards movement or downwards movement.<br>
1909 Example: <font face="Courier New, Courier, mono" size="2">CarStopSound =
1910 stop.wav</font></p>
1911
1912 <p align="left"><strong>14. CarIdleSound</strong> - the sound file to play when
1913 the elevator car is idle (generally the fan sound). Default is
1914 <em>elevidle.wav</em>. Leave the filename field blank for no sound. <br>
1915 Example: <font face="Courier New, Courier, mono" size="2">CarIdleSound =
1916 idle.wav</font></p>
1917
1918 <p align="left"><strong>15. ChimeSound</strong> - the sound file to play when
1919 the elevator car arrives at a floor. Default is <em>chime1.wav</em>. This must be
1920 specified after the CreateCar command. This is used for both up and down
1921 chimes. Leave the filename field blank for no sound. <br>
1922 Syntax: <font face="Courier New, Courier, mono" size="2">ChimeSound
1923 <em>doornumber</em> = <em>filename</em></font><br>
1924 Example: <font face="Courier New, Courier, mono" size="2">ChimeSound 1 =
1925 chime.wav</font></p>
1926
1927 <p align="left"><strong>16. UpChimeSound</strong> - the sound file to play when
1928 the elevator car arrives at a floor and it's direction is up. Default is
1929 <em>chime1.wav</em>. Leave the filename field blank for no sound. This must be
1930 specified after the CreateCar command.<br>
1931 Syntax: <font face="Courier New, Courier, mono" size="2">UpChimeSound
1932 <em>doornumber</em> = <em>filename</em></font><br>
1933 Example: <font face="Courier New, Courier, mono" size="2">UpChimeSound 1 =
1934 chime.wav</font></p>
1935
1936 <p align="left"><strong>17. DownChimeSound</strong> - the sound file to play
1937 when the elevator car arrives at a floor and it's direction is down. Default is
1938 <em>chime1.wav</em>. Leave the filename field blank for no sound. This must be
1939 specified after the CreateCar command.<br>
1940 Syntax: <font face="Courier New, Courier, mono" size="2">DownChimeSound
1941 <em>doornumber</em> = <em>filename</em></font><br>
1942 Example: <font face="Courier New, Courier, mono" size="2">DownChimeSound 1 =
1943 chime.wav</font></p>
1944
1945 <p align="left"><strong>18. AlarmSound</strong> - the sound file to play when
1946 the elevator car's alarm button is pressed. Default is <em>bell1.wav</em>. Leave the
1947 filename field blank for no sound. <br>
1948 Example: <font face="Courier New, Courier, mono" size="2">AlarmSound =
1949 bell2.wav</font></p>
1950
1951 <p align="left"><strong>19. AlarmSoundStop</strong> - the sound file to play
1952 when the elevator car's alarm button is released. Leave the filename field blank for
1953 no sound. Default is <em>bell1-stop.wav</em>.<br>
1954 Example: <font face="Courier New, Courier, mono" size="2">AlarmSoundStop =
1955 bell2-stop.wav</font></p>
1956
1957 <p align="left"><strong>20. BeepSound</strong> - the sound file to play when
1958 the elevator car reaches a new floor. There is no default; if this is set, the
1959 beeps will be automatically enabled. If an asterisk (*) is specified, it is
1960 replaced with the current floor number.<br>
1961 Example: <font face="Courier New, Courier, mono" size="2">BeepSound =
1962 beep.wav</font></p>
1963
1964 <p align="left"><strong>21. FloorSound</strong> - the sound file(s) to play
1965 when the elevator car arrives at a floor; normally this is used for files that
1966 speak the floor number. There is no default; if this is set, the sounds will be
1967 automatically enabled. If an asterisk (*) is specified, it is replaced with the
1968 current floor number.<br>
1969 Example: <font face="Courier New, Courier, mono" size="2">FloorSound =
1970 floor*.wav</font></p>
1971
1972 <p align="left"><strong>22. UpMessage</strong> - the notification sound file(s)
1973 to play after the elevator car arrives at a floor and the doors open - this tells
1974 the passengers that the elevator is going up. There is no default; if this is
1975 set, the sound will be automatically enabled. If an asterisk (*) is specified,
1976 it is replaced with the current floor number.<br>
1977 Example: <font face="Courier New, Courier, mono" size="2">UpMessage =
1978 goingup.wav</font></p>
1979
1980 <p align="left"><strong>23. DownMessage</strong> - the notification sound
1981 file(s) to play after the elevator car arrives at a floor and the doors open - this
1982 tells the passengers that the elevator is going down. There is no default; if
1983 this is set, the sound will be automatically enabled. If an asterisk (*) is
1984 specified, it is replaced with the current floor number.<br>
1985 Example: <font face="Courier New, Courier, mono" size="2">DownMessage =
1986 goingdown.wav</font></p>
1987
1988 <p align="left"><strong>24. OpenMessage</strong> - the notification sound
1989 file(s) to play when the elevator doors begin opening - this tells the
1990 passengers that the doors are opening. There is no default; if this is set, the
1991 sound will be automatically enabled. If an asterisk (*) is specified, it is
1992 replaced with the current floor number.<br>
1993 Example: <font face="Courier New, Courier, mono" size="2">OpenMessage =
1994 doorsopening.wav</font></p>
1995
1996 <p align="left"><strong>25. CloseMessage</strong> - the notification sound
1997 file(s) to play when the elevator doors begin closing - this tells the
1998 passengers that the doors are closing. There is no default; if this is set, the
1999 sound will be automatically enabled. If an asterisk (*) is specified, it is
2000 replaced with the current floor number.<br>
2001 Example: <font face="Courier New, Courier, mono" size="2">CloseMessage =
2002 doorsclosing.wav</font></p>
2003
2004 <p align="left"><strong>26. Music</strong> - the sound file to play for the
2005 elevator car music - the sound is automatically looped. There is no default; if
2006 this is set, the sound will be automatically enabled. <br>
2007 Example: <font face="Courier New, Courier, mono" size="2">Music =
2008 musicfile.wav</font></p>
2009
2010 <p align="left"><strong>27. NudgeSound</strong> - the sound file to play while
2011 in nudge mode. Default is <em>buzz.wav</em>. Leave the filename field blank for
2012 no sound. This must be specified after the CreateCar command.<br>
2013 Syntax: <font face="Courier New, Courier, mono" size="2">NudgeSound
2014 <em>doornumber</em> = <em>filename</em></font><br>
2015 Example: <font face="Courier New, Courier, mono" size="2">NudgeSound 1 =
2016 buzz.wav</font></p>
2017
2018 <p align="left"><strong>28. Doors</strong> - sets the number of doors the
2019 elevator car will have. The default is 1. Set to 0 in order to have a doorless
2020 elevator car.<br>
2021 Example: <font face="Courier New, Courier, mono" size="2">Doors = 2</font></p>
2022
2023 <p align="left"><strong>29. MusicPosition</strong> - sets the position of the
2024 music sound emitter relative of the elevator car's position. If this command is not
2025 specified, it'll be placed in the center of the elevator car on the ceiling.<br>
2026 Syntax: <font face="Courier New, Courier, mono" size="2">MusicPosition = <em>x,
2027 y, z</em><br>
2028 </font>Example: <font face="Courier New, Courier, mono" size="2">MusicPosition
2029 = 0, 8, 0</font></p>
2030
2031 <p align="left"><strong>30. MusicOn</strong> - Enables or disables music on
2032 start. Default is true.<br>
2033 Syntax: <font face="Courier New, Courier, mono" size="2">MusicOn =
2034 false</font></p>
2035
2036 <p align="left"><strong>31. MusicOnMove</strong> - Determines if music should
2037 only be played while the elevator is moving or not. Default is false.<br>
2038 Syntax: <font face="Courier New, Courier, mono" size="2">MusicOnMove =
2039 true</font></p>
2040
2041 <p align="left"><strong>32. DisplayFloors</strong> - sets the floors that will
2042 be displayed by the elevator car's indicators. This command uses the same syntax as
2043 the ServicedFloors command.<br>
2044 Syntax: <font face="Courier New, Courier, mono" size="2">DisplayFloors = <em>0,
2045 9, 19, 29</em></font></p>
2046
2047 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>33.
2048 AutoEnable</strong> - Determines if interior objects should automatically be
2049 enabled or disabled when the user enters/exits the elevator car (set to false for
2050 glass elevators).<br>
2051 Syntax: <font face="Courier New, Courier, mono" size="2">AutoEnable =
2052 false</font></p>
2053
2054 <p align="left"><strong>34. DoorSensor</strong> - enable or disable the door
2055 sensor (electric eye), which is a trigger object placed in the elevator door
2056 area. Default is enabled for automatic doors. A second parameter specifies the
2057 sound file to play when switching between on and off - this is normally used
2058 for a relay switch sound effect. Only specify the first parameter for no sound.
2059 This must be specified after the CreateCar command.<br>
2060 Syntax: <font face="Courier New, Courier, mono" size="2">DoorSensor
2061 <em>doornumber</em> = <em>enable[, filename]</em></font><br>
2062 Example: <font face="Courier New, Courier, mono" size="2">DoorSensor 1 = true,
2063 click.wav</font><br>
2064 <br>
2065 To have the sensor play a continuous beep while it's on (obstructed), create a
2066 sound inside the elevator car with the AddSound command using the filename of the
2067 beep sound you want, and then create an action with the elevator car's "sensor"
2068 command name. So for elevator 1 car 1, you would create an action named "Elevator
2069 1:Car 1:sensor", and the action would do a "playsound" command on the sound you
2070 created.<br>
2071 </p>
2072
2073 <p align="left"><strong>35. CarEmergencyStopSound</strong> - the sound file to play
2074 for the elevator car when an emergency stop is initiated.
2075 Leave the filename field blank to use the normal car stop sound, if specified.
2076 By default no sound is played.<br>
2077 Example: <font face="Courier New, Courier, mono" size="2">CarEmergencyStopSound =
2078 emergstop_car.wav</font></p>
2079
2080 <p align="left"><strong>36. IndependentService</strong> - enables independent
2081 service mode for the elevator, and makes this car the active car for the mode.<br>
2082 Example: <font face="Courier New, Courier, mono" size="2">IndependentService =
2083 true</font></p>
2084
2085 <p align="left"><strong>37. FireService2</strong> - sets the fire service phase
2086 2 mode that the elevator will start with, and makes this car the active car for the mode.
2087 Default is 0. Values are 0 for off, 1 for on, 2 for hold.<br>
2088 Syntax: <font face="Courier New, Courier, mono" size="2">FireService2 =
2089 1</font></p>
2090
2091 <br>
2092
2093 <p align="left"><strong>Commands:</strong></p>
2094
2095 <p align="left"><strong>1. CreateCar</strong> - creates an elevator car on the
2096 specified floor.  This command is only used for creating additional cars, since
2097 the elevator's CreateElevator command creates Car 1 automatically.
2098 The <em>Floor</em> value must be greater than the previous car's floor.<br>
2099 Syntax: <font face="Courier New, Courier, mono" size="2">CreateCar
2100 <em>floor<br>
2101 </em></font>Example:<font face="Courier New, Courier, mono" size="2"><em></em>
2102 CreateCar 1</font></p>
2103
2104 <p align="left"><strong>2. AddFloor</strong> - adds a textured floor with the
2105 specified dimensions for the car<br>
2106 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloor <em>name,
2107 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
2108 <em>z2</em>, <em>voffset1</em>, <em>voffset2, reverse_axis, texture_direction,
2109 tw</em>, <em>th</em></font><br>
2110 Example: <font face="Courier New, Courier, mono" size="2">AddFloor Floor1,
2111 Wood2, 0.5, -3.5, -3, 3.5, 3, 0, 0, false, false, 0, 0</font></p>
2112
2113 <p align="left"><strong>3. AddWall</strong> - adds a textured wall for the
2114 car<br>
2115 Syntax: <font face="Courier New, Courier, mono" size="2">AddWall <em>name,
2116 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>, z2,
2117 <em>height1</em>, <em>height2</em>, <em>voffset1</em>, <em>voffset2,
2118 </em><em>tw</em>, <em>th</em></font><br>
2119 Example: <font face="Courier New, Courier, mono" size="2">AddWall Wall1, Wood1,
2120 0.5, -3.5, 3, 3.5, 3, 8, 8, 0, 0, 2, 2</font></p>
2121
2122 <p align="left">The car's AddWall command is similar to the other AddWall
2123 commands.</p>
2124
2125 <p align="left"><strong>4. AddDoors</strong> - creates elevator car doors<br>
2126 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoors <em>number,
2127 lefttexture, righttexture</em>, <em>thickness, CenterX, CenterZ, width, height,
2128 direction, tw, th</em></font></p>
2129
2130 <p align="left">The AddDoors command creates working elevator car doors at the
2131 central location specified by <em>CenterX</em> and <em>CenterZ</em>, with
2132 <em>width</em> and <em>height</em> specifiying the width and height of each
2133 door, and <em>Direction</em> specifying the direction that the doors face
2134 (currently there are only 2: <em>false</em> if the doors are on the left or
2135 right sides, and <em>true</em> if the doors are on the front or back sides).
2136 <em>Number</em> specifies the number of the door to create (related to the
2137 <em>Doors</em> command) - if the car only has one door, or if the Doors
2138 command was not used, specify 1 here.</p>
2139
2140 <p align="left"><strong>5. AddShaftDoors</strong> - creates elevator shaft
2141 doors<br>
2142 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoors
2143 <em>number, lefttexture, righttexture</em>, <em>thickness, CenterX, CenterZ,
2144 voffset, tw, th</em></font></p>
2145
2146 <p align="left">The AddShaftDoors command creates working elevator shaft doors
2147 at the central location specified by <em>CenterX</em> and <em>CenterZ</em>.
2148 Other parameters such as width, height, and direction are taken from the
2149 AddDoors command (so the regular elevator car doors need to be created first). The
2150 <em>voffset</em> parameter allows you to create shaft doors at a different
2151 vertical position than the base of the floor, and the elevator will
2152 automatically stop according to the shaft door's voffset for that floor. These
2153 doors should be moved slightly away from the car doors (to separate them
2154 both). Also, this command creates doors at all the floors specified in the
2155 ServicedFloors value, and cuts any shaft walls that are within the door area
2156 (and so this must be called after the shaft walls are created). <em>Number</em>
2157 specifies the number of the door to create (related to the <em>Doors</em>
2158 command) - if the elevator car only has one door, or if the Doors command was not
2159 used, specify 1 here.</p>
2160
2161 <p align="left"><strong>6. CreatePanel</strong> - creates a button panel<br>
2162 Syntax: <font face="Courier New, Courier, mono" size="2">CreatePanel
2163 <em>texturename</em>, <em>rows, columns, direction, CenterX, CenterZ,
2164 buttonwidth, buttonheight, spacingX, spacingY, voffset, tw, th<br>
2165 </em></font> Example<font face="Courier New, Courier, mono" size="2"><em>:
2166 </em><font face="Courier New, Courier, mono" size="2">CreatePanel Wall1, 5, 5,
2167 right, -3, -3, 0.15, 0.15, 0.3, 0.45, 4.5, 0, 0</font></font></p>
2168
2169 <p align="left">The CreatePanel command creates a button panel at a position
2170 relative to the elevator car's center position (origin). <em>Rows</em> and
2171 <em>Columns</em> define the grid size of the panel. <em>Direction</em> is
2172 either "front", "back", "left" or "right", defining which direction the panel
2173 faces. <em>SpacingX</em> is the space (percent of a button's width)
2174 horizontally between each button, and <em>spacingY</em> is the space (percent
2175 of a button's height) vertically between each button. Not all positions need to
2176 be used; this is simply to provide a grid layout for the panel. This command
2177 also determines the width and height of the panel based on the spacing and
2178 button sizes. A simple formula for determining panel width or height is this -
2179 for width, it's (columns * buttonwidth) + (spacingX * (columns + 1)); for
2180 height, just swap columns with rows and spacingX with spacingY.
2181 If a texture is not specified, the back portion of the panel will not be shown.</p>
2182
2183 <p align="left"><strong>7. AddButton</strong> - creates a standard button on
2184 the panel<br>
2185 Syntax: <font face="Courier New, Courier, mono" size="2">AddButton
2186 <em>panel_number, sound, texture_unlit</em>, <em>texture_lit, row, column,
2187 floor/type, width, height[, hoffset, voffset]</em></font><br>
2188 Example 1: <font face="Courier New, Courier, mono" size="2">AddButton 1,
2189 switch.wav, Button5, ButtonLit5, 7, 3, 4, 1, 1</font><br>
2190 Example 2: <font face="Courier New, Courier, mono" size="2">AddButton 1, ,
2191 Button5, ButtonLit5, 7, 3, 4, 1, 1, 0.1, -0.1</font></p>
2192
2193 <p align="left">The AddButton command creates a button on the button panel
2194 created with CreatePanel. <em>Panel_number</em> specifies the number of the
2195 panel to add the button to. <em>Row</em> and <em>Column</em> specify the
2196 position on the grid where the button should be. <em>Floor/Type</em> specifies
2197 either the floor number that this button calls, or the action name such as
2198 "Open" (see the AddControl command for more info). <em>Width</em> and
2199 <em>Height</em> specify the width and height of the button, as a percentage of
2200 a single grid unit size (1 being 100%, 0.5 being 50%). If both values are 0,
2201 the default of 1 is used for both values. If only one of the values is 0, then
2202 the exact size other is used; for example, if <em>width</em> is 0 and
2203 <em>height</em> is 1 (or any other number), then the width will end up being
2204 the same size as the height. <em>Hoffset</em> and <em>Voffset</em> are optional
2205 parameters, and are used to position the button outside the normal grid, and
2206 are in grid units (buttonwidth and buttonheight parameters of the CreatePanel
2207 function). In the second example, the button is positioned 0.1 grid units to
2208 the right, and 0.1 grid units down. Notice that no sound is specified in the
2209 2nd example - this means that a sound won't be played.</p>
2210
2211 <p align="left"><strong>8. AddControl</strong> - advanced command for creating
2212 buttons, switches and knobs on the panel<br>
2213 Syntax: <font face="Courier New, Courier, mono" size="2">AddControl
2214 <em>panel_number, sound, row, column, width, height, hoffset, voffset,
2215 selection_position, command_name(s), texture_name(s)<br>
2216 </em></font>Example 1: <font face="Courier New, Courier, mono"
2217 size="2">AddControl 1, switch.wav, 7, 3, 1, 1, 0, 0, 1, open, ButtonOpen</font><br>
2218 Example 2: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2219 switch.wav, 7, 3, 1, 1, 0, 0, 1, FanOff, FanOn, SwitchFanOff,
2220 SwitchFanOn</font><br>
2221 Example 3: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2222 switch.wav, 7, 3, 1, 1, 0, 0, 1, Off, 4, Button5, ButtonLit5</font><br>
2223 Example 4: <font face="Courier New, Courier, mono" size="2">AddControl 1,
2224 switch.wav, 7, 3, 1, 1, 0, 0, 1, Fire2Off, Fire2On, Fire2Hold, FireKnob1,
2225 FireKnob2, FireKnob3</font></p>
2226
2227 <p align="left">The AddControl command creates an advanced control on the
2228 specified button panel (created with CreatePanel). Most of the parameters are
2229 the same as the AddButton command, but the <em>command_name(s)</em> and
2230 <em>texture_name(s)</em> parameters allow you to specify a list of commands,
2231 and a list of textures to go along with those commands. A texture needs to be
2232 specified for every command; if you specify 3 commands and only 2 textures, you
2233 will get an error. The first example shows a door open button being created,
2234 with the command "open" and the texture "ButtonOpen". The 2nd example shows a
2235 fan switch being created, with the first command being "FanOff" with the
2236 "SwitchFanOff" texture being used for that, and "FanOn" for the second command
2237 with the "SwitchFanOn" texture being used for that. Example 3 shows a standard
2238 floor button being created (which is what the AddButton command does) and
2239 example 4 shows a fire service mode knob being created with 3 positions. Leave
2240 the sound field blank for no sound to be played.  The <em>selection_position</em>
2241 parameter specifies the starting selection position, which is normally 1.</p>
2242
2243 <p align="left">Available command names for elevators:</p>
2244
2245 <p align="left"><em>Off</em> (no action)<br>
2246 <em>[floor number]</em> (specify only the floor number to send elevator to that floor)<br>
2247 <em>Open [door]</em> (open doors)<br>
2248 <em>Close [door]</em> (close doors)<br>
2249 <em>OpenInt [door]</em> (open interior/car doors)<br>
2250 <em>CloseInt [door]</em> (close interior/car doors)<br>
2251 <em>OpenExt [door]</em> (open exterior/shaft doors)<br>
2252 <em>CloseExt [door]</em> (close exterior/shaft doors)<br>
2253 <em>OpenManual [door]</em> (open doors manually)<br>
2254 <em>CloseManual [door]</em> (close doors manually)<br>
2255 <em>OpenIntManual [door]</em> (open interior/car doors manually)<br>
2256 <em>CloseIntManual [door]</em> (close interior/car doors manually)<br>
2257 <em>OpenExtManual [door]</em> (open exterior/shaft doors manually)<br>
2258 <em>CloseExtManual [door]</em> (close exterior/shaft doors manually)<br>
2259 <em>StopDoors [door]</em> (stop doors during manual movement)<br>
2260 <em>Cancel</em> (call cancel)<br>
2261 <em>Run</em> (put elevator in run state)<br>
2262 <em>Stop</em> (put elevator in stop state)<br>
2263 <em>EStop</em> (emergency stop)<br>
2264 <em>Alarm</em> (alarm trigger)<br>
2265 <em>Fire1Off</em> (fire service phase 1 off for all elevators in same bank,
2266 which means all served by first call button on recall floor)<br>
2267 <em>Fire1On</em> (fire service phase 1 on for all elevators in same bank)<br>
2268 <em>Fire1Bypass</em> (fire service phase 1 bypass for all elevators in same
2269 bank)<br>
2270 <em>Fire2Off</em> (fire service phase 2 off)<br>
2271 <em>Fire2On</em> (fire service phase 2 on)<br>
2272 <em>Fire2Hold</em> (fire service phase 2 hold)<br>
2273 <em>UpPeakOn</em> (enable up peak)<br>
2274 <em>UpPeakOff</em> (disable up peak)<br>
2275 <em>DownPeakOn</em> (enable down peak)<br>
2276 <em>DownPeakOff</em> (disable down peak)<br>
2277 <em>PeakOff</em> (disable both peak modes)<br>
2278 <em>IndOn</em> (enable independent service mode)<br>
2279 <em>IndOff</em> (disable independent service)<br>
2280 <em>InsOn</em> (enable inspection service mode)<br>
2281 <em>InsOff</em> (disable inspection service)<br>
2282 <em>AcpOn</em> (enable ACP mode)<br>
2283 <em>AcpOff</em> (disable ACP mode)<br>
2284 <em>FanOn</em> (enable fan/idle sound)<br>
2285 <em>FanOff</em> (disable fan/idle sound)<br>
2286 <em>Hold [door]</em> (hold door and disable door sensor temporarily)<br>
2287 <em>MusicOn</em> (enable music sound)<br>
2288 <em>MusicOff</em> (disable music sound)<br>
2289 <em>UpOn</em> (inspection mode or manual elevator up on)<br>
2290 <em>UpOff</em> (inspection mode or manual elevator up off)<br>
2291 <em>DownOn</em> (inspection mode or manual elevator down on)<br>
2292 <em>DownOff</em> (inspection mode or manual elevator down off)<br>
2293 <em>GoOn</em> (inspection mode go on)<br>
2294 <em>GoOff</em> (inspection mode go off)<br>
2295 <em>Return</em> (return to nearest serviced floor after stop)<br>
2296 <em>Up</em> (move up for manual elevator, for a button held by mouse button)<br>
2297 <em>Down</em> (move down for manual elevator, for a button held by mouse button)<br>
2298 <em>InterlocksOn</em> (enable interlocks)<br>
2299 <em>InterlocksOff</em> (disable interlocks)<br>
2300 <em>Sensor [door]</em> (open and hold doors without disabling sensor, used by door sensor)<br>
2301 <em>Reset [door]</em> (reset door timer and turn on door sensor, which turns off hold)<br>
2302 <em>SensorOn [door]</em> (enable door sensor)<br>
2303 <em>SensorOff [door]</em> (disable door sensor)<br>
2304 <em>SensorReset [door]</em> (same as Reset but doesn't touch sensor setting)<br>
2305 </p>
2306
2307 <p align="left">Some commands in the above list have an optional <em>Door</em> parameter.
2308 For example, <em>Open 2</em> will open door 2, while <em>Open</em> or <em>Open 0</em> will open all
2309 doors.<br>
2310 <br>
2311 When this command is used, actions are created using the specified commands.
2312 The resulting names of the actions are the elevator name, followed by a colon,
2313 then the Car name followed by another colon, and then the command name,
2314 in order to be unique to each elevator and car. So the "Open"
2315 command for Elevator 1 Car 1 is created as an action named "Elevator 1:Car 1:open", and you
2316 can specify more actions with that name to run multiple actions when the
2317 elevator car opens it's doors.<br>
2318 <br>
2319 <strong>9. AddFloorIndicator</strong> - creates a floor indicator<br>
2320 Syntax: <font face="Courier New, Courier, mono"
2321 size="2">AddFloorIndicator<em> texture_prefix, direction, CenterX, CenterZ,
2322 width, height, voffset</em></font> </p>
2323
2324 <p align="left">The AddFloorIndicator command creates a floor indicator at the
2325 position (relative to the elevator car) specified by <em>CenterX</em> and
2326 <em>CenterZ</em>. <em>Direction</em> is the direction the indicator faces, and
2327 can be either "left", "right", "front" or "back". This command can be given
2328 multiple times to create multiple indicators. <em>Texture_prefix</em> is the
2329 base name of the texture to load when displaying a floor ID; for example if the
2330 elevator car is on floor 3, and you specify a prefix of "Button", it'll load the
2331 "Button3" texture.</p>
2332
2333 <p align="left"><strong>10. AddDirectionalIndicator</strong> - creates an
2334 internal directional indicator/lantern<br>
2335 Syntax: <font face="Courier New, Courier, mono"
2336 size="2">AddDirectionalIndicator<em> ActiveDirection, Single, Vertical,
2337 BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit, DownTexture,
2338 DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight,
2339 ShowBack, tw, th<br>
2340 </em></font>Example: <font face="Courier New, Courier, mono"
2341 size="2"><em>AddDirectionalIndicator false, false, true, Metal, UpLight,
2342 UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true, 0,
2343 0</em></font></p>
2344
2345 <p align="left">This command will create a directional indicator inside the
2346 elevator car, and the positioning is relative of the elevator car's center.</p>
2347
2348 <p align="left"><em>ActiveDirection</em> determines if the indicator should
2349 continuously display the active elevator direction (true), or if it should show
2350 the elevator's direction for the current call (false, default)</p>
2351
2352 <p align="left"><em>Single</em> determines if a single indicator light should
2353 be created instead of two. If this is true, the unlit texture is specified in
2354 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
2355
2356 <p align="left"><em>Vertical</em> determines if the two lights should be
2357 vertically separated (true), or horizontally separated (false)</p>
2358
2359 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
2360 the lights</p>
2361
2362 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
2363 used for the lights themselves, and the "Lit" texures are the ones to show when
2364 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
2365
2366 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
2367 of the indicators</p>
2368
2369 <p align="left"><em>voffset</em> is the altitude offset that the object is
2370 above each floor</p>
2371
2372 <p align="left"><em>direction </em>determines the direction the indicators
2373 face:<br>
2374 'front' means they face towards the front of the building<br>
2375 'back' means they face towards the back of the building<br>
2376 'left' means they face left<br>
2377 'right' means they face right</p>
2378
2379 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
2380 height of the wall plate</p>
2381
2382 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
2383 and is either true or false</p>
2384
2385 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
2386 wall plate.</p>
2387
2388 <p align="left"><strong></strong><strong>11. AddDirectionalIndicators</strong>
2389 - creates the elevator's exterior directional indicator/lanterns (similar to
2390 the CreateCallButtons command) <br>
2391 Syntax: <font face="Courier New, Courier, mono"
2392 size="2">AddDirectionalIndicators<em> Relative, ActiveDirection, Single,
2393 Vertical, BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit, DownTexture,
2394 DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight,
2395 ShowBack, tw, th<br>
2396 </em></font>Example:<font face="Courier New, Courier, mono"
2397 size="2"><em> AddDirectionalIndicators true, false, false, true, Metal,
2398 UpLight, UpLightOn, DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true,
2399 0, 0</em></font></p>
2400
2401 <p align="left">This command will create directional indicators on all floors
2402 the elevator car serves. It'll also automatically create the up and down lights
2403 depending on the floor. To create indicators on a per-floor basis, use the
2404 AddDirectionalIndicator command in the Floor section.</p>
2405
2406 <p align="left"><em>Relative</em> determines if the X and Z coordinates are
2407 relative to the elevator car's origin (center) or not.</p>
2408
2409 <p align="left"><em>ActiveDirection</em> determines if the indicator should
2410 continuously display the active elevator direction (true), or if it should show
2411 the elevator's direction for the current call (false, default)</p>
2412
2413 <p align="left"><em>Single</em> determines if a single indicator light should
2414 be created instead of two. If this is true, the unlit texture is specified in
2415 <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
2416
2417 <p align="left"><em>Vertical</em> determines if the two lights should be
2418 vertically separated (true), or horizontally separated (false)</p>
2419
2420 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
2421 the lights</p>
2422
2423 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
2424 used for the lights themselves, and the "Lit" texures are the ones to show when
2425 the light is on. <em>DownTexture</em> is ignored if <em>Single</em> is true.</p>
2426
2427 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
2428 of the indicators</p>
2429
2430 <p align="left"><em>voffset</em> is the altitude offset that the object is
2431 above each floor</p>
2432
2433 <p align="left"><em>direction </em>determines the direction the indicators
2434 face:<br>
2435 'front' means they face towards the front of the building<br>
2436 'back' means they face towards the back of the building<br>
2437 'left' means they face left<br>
2438 'right' means they face right</p>
2439
2440 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
2441 height of the wall plate</p>
2442
2443 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
2444 and is either true or false</p>
2445
2446 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
2447 wall plate.</p>
2448
2449 <p align="left"><strong>12. SetShaftDoors</strong> - (deprecated) sets
2450 positioning and thickness of shaft doors which will be created with the
2451 <em>older AddShaftDoor</em> command. Please use the newer AddShaftDoor syntax
2452 instead.<br>
2453 Syntax: <font face="Courier New, Courier, mono"
2454 size="2">SetShaftDoors<em> number</em>, <em>thickness, CenterX,
2455 CenterZ</em></font> </p>
2456
2457 <p align="left">This command must be used before calling <em>the older
2458 AddShaftDoor</em> command. This specifies the thickness and X/Z positioning for
2459 the shaft doors that will be created. <em>Number</em> specifies the door number
2460 this is associated with (use 1 if only one door).</p>
2461
2462 <p align="left"><strong>13. AddFloorSigns</strong> - creates floor signs on all
2463 floors serviced by the elevator car<br>
2464 Syntax: <font face="Courier New, Courier, mono"
2465 size="2">AddFloorSigns<em> door_number, relative, texture_prefix, direction,
2466 CenterX, CenterZ, width, height, voffset</em></font> </p>
2467
2468 <p align="left">The AddFloorSigns command creates floor signs (similar to floor
2469 indicators) on all the floors serviced by the current elevator car.
2470 <em>Direction</em> is the direction the signs face, and can be either "left",
2471 "right", "front" or "back". <em>Texture_prefix</em> is the base name of the
2472 texture to load when displaying a floor ID; for example if the sign is on floor
2473 3, and you specify a prefix of "Button", it'll load the "Button3" texture.
2474 <em>Door_number</em> specifies the door number to check against, meaning if
2475 shaft doors don't exist on a certain floor for the specified door, the sign
2476 won't be created on that floor. This can be bypassed by setting
2477 <em>door_number</em> to 0.</p>
2478
2479 <p align="left"><strong>14. AddSound</strong> - creates a user-defined sound at
2480 the specified position<br>
2481 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
2482 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
2483 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
2484 direction_x, direction_y, direction_z]</em></font><br>
2485 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
2486 sound.wav, 10, 100, 5, true<br>
2487 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
2488 MySound, ambient.ogg, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
2489 0</font></p>
2490
2491 <p align="left">For information on the parameters, see the AddSound command in
2492 the Global Commands section. The only difference here is that the X, Y and Z position
2493 values are relative of the elevator car's center/origin. <em>Loop</em> specifies if
2494 the sound should loop and play on startup.</p>
2495
2496 <p align="left"><strong>15. AddDoorComponent</strong> - creates a single
2497 elevator car door component, used for creating custom door styles<br>
2498 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoorComponent
2499 <em>number, name, texture, sidetexture, thickness, direction, openspeed,
2500 closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
2501 side_th</em></font></p>
2502
2503 <p align="left">Example: <font face="Courier New, Courier, mono"
2504 size="2">AddDoorComponent 1, Left, ElevDoors, Black, 0.2, left, 0.3, 0.3,
2505 -1.75, 0, 0, 0, 8, 0, 0, 0, 0, 0</font></p>
2506
2507 <p align="left">The AddDoorComponent command allows you to create your own
2508 custom door styles. It creates a single door component within a set - for
2509 example, the standard center-open doors have 2 door components: left and right.
2510 With this command you specify the positioning of a component similar to wall
2511 creation, specify it's textures, tell it which direction it's going to travel
2512 during opening, and what it's speed will be. <em>Number</em> specifies the
2513 number of the door to create (related to the <em>Doors</em> command) - if the
2514 elevator car only has one door, or if the Doors command was not used, specify 1
2515 here. <em>Texture</em> refers to the texture used on the main (front and back)
2516 sides of the door. <em>SideTexture</em> refers to the texture used on the sides
2517 (and top/bottom) of the door. <em>Direction</em> is either Up, Down, Left (or
2518 Front; is the same), or Right (or Back; is also the same). <em>Side_tw</em> and
2519 <em>side_th</em> specify the texture tiling for the sides. Use the FinishDoors
2520 command after creating the components. The above example creates the left door
2521 component for the standard center-open doors, and uses default speed values.
2522 This command replaces the AddDoors command.</p>
2523
2524 <p align="left"><strong>16. AddShaftDoorsComponent</strong> - creates a single
2525 shaft door component for all serviced floors - used for creating custom door
2526 styles<br>
2527 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaftDoorsComponent
2528 <em>number, name, texture, sidetexture, thickness, direction, openspeed,
2529 closespeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw,
2530 side_th</em></font></p>
2531
2532 <p align="left">This command is almost identical to the AddDoorComponent
2533 command, except that it creates shaft doors. Use the FinishShaftDoors command
2534 after creating the components. This command replaces the AddShaftDoors command.
2535 To create shaft doors on a per-floor basis, use the AddShaftDoorComponent
2536 command in the Floors section.</p>
2537
2538 <p align="left"><strong>17. FinishDoors</strong> - finishes elevator car door
2539 creation - use this after all related AddDoorComponent commands are used.<br>
2540 Syntax: <font face="Courier New, Courier, mono" size="2">FinishDoors
2541 <em>number[, door_walls, track_walls]</em></font></p>
2542
2543 <p align="left">This command completes the elevator car door creation by storing
2544 the central location and shift factor, cutting walls for the door, creating
2545 side connection pieces for the cut, etc. The optional <em>door_walls</em>
2546 option specifies if the command should create the side door filler walls (texture used is "ConnectionWall"), and the
2547 optional <em>track_walls</em> option specifies if the top/bottom track connection walls
2548 should be made (texture used is "Connection").</p>
2549
2550 <p align="left"><strong>18. FinishShaftDoors</strong> - finishes shaft door
2551 creation for all serviced floors - use this after all related
2552 AddShaftDoorsComponent commands are used, or specify it without the
2553 AddShaftDoorComponent commands if you're creating a manual shaft door.<br>
2554 Syntax: <font face="Courier New, Courier, mono" size="2">FinishShaftDoors
2555 <em>number[, door_walls, track_walls]</em></font></p>
2556
2557 <p align="left">This command is almost identical to the FinishDoors command
2558 except that it's used for finishing shaft doors on all serviced floors.</p>
2559
2560 <p align="left"><strong>19. AddDoor</strong> - adds a textured door in the
2561 specified location, which moves with the elevator car<br>
2562 Syntax: <font face="Courier New, Courier, mono" size="2">AddDoor <em>opensound,
2563 closesound, texturename, open, thickness</em>, <em>direction, speed,
2564 CenterX</em>, <em>CenterZ</em>, <em>width</em>, <em>height</em>,
2565 <em>voffset</em>, <em>tw</em>, <em>th</em></font></p>
2566
2567 <p align="left">See the AddDoor command in the floor section for information on
2568 the parameters. <em>CenterX</em> and <em>CenterZ</em> are relative of the
2569 elevator car's center.</p>
2570
2571 <p align="left"><strong>20. AddModel</strong> - adds a 3D model to the elevator car.
2572 If a filename is specified, the model's textures/materials must be defined in a separate ".material" file,
2573 and a separate collider mesh ".collider" will be loaded. In that situation, if a collider mesh
2574 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>
2575 Syntax: <font face="Courier New, Courier, mono" size="2">AddModel<em> name,
2576 filename, center, CenterX, CenterY, CenterZ, RotationX, RotationY, RotationZ,
2577 MaxRenderDistance, ScaleMultiplier, EnablePhysics, Restitution, Friction,
2578 Mass</em><em><br>
2579 </em></font>Example 1:<font face="Courier New, Courier, mono" size="2"> AddModel
2580 MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font><br>
2581 Example 2:<font face="Courier New, Courier, mono" size="2"> AddModel MyModel,
2582 cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, true, 0.1, 0.5, 0.1</font><br>
2583 Example 3:<font face="Courier New, Courier, mono" size="2"> AddModel MyModel,
2584 , false, 0, 0, 0, 0, 0, 0, 0, 1, true, 0.1, 0.5, 0.1</font></p>
2585
2586 <p align="left">The <em>Center</em> value is either true or false, and
2587 determines if the loaded model should be automatically centered, otherwise the
2588 exact mesh positioning in the model file will be used. The <em>CenterY</em>
2589 value is relative to the current elevator car's base. <em>MaxRenderDistance</em>
2590 determines the maximum distance in feet that the object will be shown (0 means
2591 unlimited). <em>ScaleMultiplier</em> allows you to change the size of the
2592 object during the load - for example, set to 2 to double the size. Models are
2593 in the OGRE native mesh format. In the example, the material/texture file is
2594 cube.material, and the optional collider mesh file is cube.collider.
2595 <em>EnablePhysics</em> enables Bullet physics on the object, and
2596 <em>Restitution</em>, <em>Friction</em> and <em>Mass</em> determine the
2597 physical properties of the object.</p>
2598
2599 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>21.
2600 AddActionControl</strong> - creates a custom control that uses a specific
2601 action defined by AddAction.<br>
2602 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
2603 <em>name, sound, direction, centerx, centerz, width, height, voffset,
2604 selection_position, action_name(s), texture_name(s)<br>
2605 </em></font>Example: <font face="Courier New, Courier, mono"
2606 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
2607 1, UndoMyAction, MyAction, Touch, TouchLit<br>
2608 </font><br>
2609 AddActionControl command creates an advanced control similar to elevator button
2610 panel controls, but assigned to an action created with the AddAction command.
2611 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
2612 to specify a list of actions, and a list of textures to go along with those
2613 actions. There needs to be a texture for every action; if you specify 3 actions
2614 and only 2 textures, you will get an error. The control starts up in the first
2615 action, and switches to the next actions in sequence when it's clicked.
2616 <em>Direction</em> is the direction the control itself will face in 3D space
2617 (front, left, right, back). <em>Voffset</em> is relative of the elevator car's
2618 base. Leave the sound field blank for no sound to be
2619 played. <em>Selection_position</em> is the starting selection position, which is
2620 normally 1.</p>
2621
2622 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>22.
2623 AddTrigger</strong> - creates a trigger that is used to signal an action when
2624 the user's camera enters or leaves the defined area.<br>
2625 Syntax:<font face="Courier New, Courier, mono" size="2"> AddTrigger <em>name,
2626 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
2627 </em></font>Example:<font face="Courier New, Courier, mono"
2628 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
2629 UndoMyAction, MyAction</font><br>
2630 <br>
2631 AddTrigger creates a trigger similar to action controls (AddActionControl) and
2632 elevator controls. The <em>action_names(s)</em> parameter allows you to specify
2633 a list of actions that this trigger will call when the camera enters or exits
2634 the area. The trigger starts in the first action, and will switch to each
2635 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
2636 <em>Z</em> parameters specify the 3D box that defines the trigger area, and are
2637 relative of the elevator car's location. Leave the <em>sound</em> field blank for
2638 no sound to be played.</p>
2639
2640 <p align="left"> </p>
2641
2642 <p align="left"><strong><font size="+1"><a name="GlobalCommands"
2643 id="GlobalCommands"></a>8. Global Commands/Functions</font></strong></p>
2644
2645 <p align="left">These commands and functions can be used anywhere in the
2646 script.<br>
2647 <br>In this section, <em>Destobject</em> refers to the destination object
2648 to create other objects in, which can be:<br>
2649 <em>Floor</em> (only available within a Floor section)</em>,<br>
2650 <em>Interfloor</em> (Floor section only),<br>
2651 <em>ColumnFrame</em> (Floor section only),<br>
2652 <em>Shaft [number]</em> (Floor section only),<br>
2653 <em>Stairwell [number]</em> (Floor section only), <br>
2654 <em>Elevator</em> (Elevator section only),<br>
2655 <em>ElevatorCar</em> (Car section only),<br>
2656 <em>External</em>,<br>
2657 <em>Landscape</em>,<br>
2658 <em>Buildings</em>,<br>
2659 <em>(custom model name)</em>,<br>
2660 <em>Shaft [number]:[model name]</em> (Floor section only), or<br>
2661 <em>Stairwell [number]:[model name]</em> (Floor section only)<br>
2662 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".
2663
2664 <p align="left"><br>
2665 <strong>a. AddTriangleWall</strong> - adds a textured triangular wall.
2666 This is the same as AddCustomWall, but with only 3 coordinates used.  If
2667 specified in a floor section, the Y values are then relative to the floor
2668 base.<br>
2669 Syntax: <font face="Courier New, Courier, mono" size="2">AddTriangleWall
2670 <em>destobject, name, texturename</em>, <em>x1</em>, <em>y1</em>, <em>z1</em>,
2671 <em>x2</em>, <em>y2</em>, <em>z2</em>, <em>x3</em>, <em>y3</em>, <em>z3</em>,
2672 <em>tw</em>, <em>th</em></font><br>
2673 Example: <font face="Courier New, Courier, mono" size="2">AddTrianglewall
2674 external, My Triangle, Brick, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0</font></p>
2675
2676 <p align="left"><strong>b. AddWall</strong> - adds a textured wall<br>
2677 Syntax: <font face="Courier New, Courier, mono" size="2">AddWall
2678 <em>destobject, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
2679 <em>x2</em>, z2, <em>height1</em>, <em>height2</em>, <em>altitude1</em>,
2680 <em>altitude2</em>, <em>tw</em>, <em>th</em></font><br>
2681 Example: <font face="Courier New, Courier, mono" size="2">AddWall buildings,
2682 Wall1, Brick, 0.5, -10, -10, 10, 10, 15, 15, Floor(2).Altitude,
2683 Floor(2).Altitude, 0, 0</font></p>
2684
2685 <p align="left">The command's parameters are the same as the Floor section's
2686 AddWall command.  This command is not available inside sections, due to section-specific AddWall commands.</p>
2687
2688 <p align="left"><strong>c. AddFloor</strong> - adds a textured floor<br>
2689 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloor
2690 <em>destobject, name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>,
2691 <em>x2</em>, <em>z2</em>, <em>altitude1</em>, <em>altitude2</em>, reverse_axis,
2692 texture_direction, <em>tw</em>, <em>th</em></font></p>
2693
2694 <p align="left">The command's parameters are the same as the Floor section's
2695 AddFloor command.  This command is not available inside sections, due to section-specific AddFloor commands.</p>
2696
2697 <p align="left"><strong>d. AddGround</strong> - adds a tile-based ground<br>
2698 Syntax: <font face="Courier New, Courier, mono" size="2">AddGround <em>name,
2699 texturename</em>, <em>x1</em>, <em>z1</em>, <em>x2</em>, <em>z2</em>,
2700 <em>altitude</em>, <em>tile_x</em>, <em>tile_y<br>
2701 </em></font>Example: <font face="Courier New, Courier, mono" size="2">AddGround
2702 AddGround Ground, Downtown, -158400, -158400, 158400, 158400, 0, 7920,
2703 7920</font></p>
2704
2705 <p align="left">This command is mainly for creating large ground sections,
2706 since using the AddFloor function with a large amount of texture tiling causes
2707 interference problems. The <em>X</em> and <em>Z</em> values specify the total
2708 size of the ground, and the <em>tile_x</em> and <em>tile_y</em> specify the
2709 size of each tile square to create. For example, if the ground is 10,000 feet
2710 wide, and tile_x and tile_y are both 1000, then 100 total tiles will be
2711 created; 10 wide and 10 deep. In the example above 7920 is 1/40 of the total
2712 width (316800 which is 158400 * 2), so the tile grid will be 40x40 tiles.</p>
2713
2714 <p align="left"><strong>e. CreateWallBox</strong> - creates 4 walls (box) at
2715 the specified coordinate locations<br>
2716 Syntax: <font face="Courier New, Courier, mono" size="2">CreateWallBox
2717 <em>destobject</em>, <em>name, texturename</em>, <em>x1</em>, <em>x2</em>,
2718 <em>z1</em>, <em>z2</em>, <em>height</em>, <em>voffset</em>, <em>tw</em>,
2719 <em>th, inside, outside, top, bottom </em></font><br>
2720 Example: <font face="Courier New, Courier, mono" size="2">CreateWallBox
2721 external, My Box, Brick, -10, 10, -10, 10, 15, 0, 0, 0, true, true, true,
2722 true</font></p>
2723
2724 <p align="left">The parameters in this command are very similar to the ones in
2725 the AddWall command shown below in the Floor section, except that a box is
2726 created instead of a single wall. <em>Inside</em> and <em>outside</em>
2727 determine if the wall should be visible from the inside/outside, and
2728 <em>top</em> and <em>bottom</em> determine if the top and bottom walls should
2729 be drawn.</p>
2730
2731 <p align="left"><strong>f. CreateWallBox2</strong> - creates 4 walls (box) at a
2732 specified central location<br>
2733 Syntax: <font face="Courier New, Courier, mono" size="2">CreateWallBox2
2734 <em>destobject</em>, <em>name, texturename</em>, <em>centerx</em>,
2735 <em>centerz</em>, <em>widthx</em>, <em>lengthz</em>, <em>height</em>,
2736 <em>voffset</em>, <em>tw</em>, <em>th</em></font><font
2737 face="Courier New, Courier, mono" size="2"><em>, inside, outside, top, bottom
2738 </em></font><br>
2739 Example: <font face="Courier New, Courier, mono" size="2">CreateWallBox2
2740 external, My Box, Brick, 0, 0, 10, 10, 15, 0, 0, 0, false, true, false,
2741 false</font></p>
2742
2743 <p align="left">The parameters are the same as the above command, except that
2744 <em>centerx</em> and <em>centerz</em> define the center of the box, and
2745 <em>widthx</em> and <em>lengthz</em> specify the width and length off of the
2746 center.<br>
2747 <br>
2748 <strong>g. AddCustomWall</strong> - creates a custom polygon (wall, floor, etc)
2749 with any number of vertex points. For example, a triangular wall has 3 vertex
2750 points, and a standard wall has 4. This function allows at least 3 vertices.
2751 The polygon will be two-sided if the DrawWalls command's MainNegative and MainPositive parameters are true.
2752 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.
2753 If the RelativeY parameter is true, and in a floor section, the Y values are relative of the floor's base.<br>
2754 Syntax: <font face="Courier New, Courier, mono" size="2">AddCustomWall
2755 <em>destobject, name, texturename[, RelativeY], x1, y1, z1, x2, y2, z2, x3, y3, z3, ..., tw,
2756 th</em></font><br>
2757 Example 1: <font face="Courier New, Courier, mono" size="2">AddCustomWall
2758 external, My Wall, Brick, 0, 0, 0, 0, 10, 0, 10, 10, 0, 15, 5, 0, 10, 0, 0, 0,
2759 0</font><br>
2760 Example 2: <font face="Courier New, Courier, mono" size="2">AddCustomWall
2761 external, My Wall, Brick, true, 0, 0, 0, 0, 10, 0, 10, 10, 0, 15, 5, 0, 10, 0, 0, 0,
2762 0</font></p>
2763
2764 <p align="left"><strong>h. AddCustomFloor</strong> - the same as AddCustomWall,
2765 but with only one vertical parameter. If specified while in a floor section,
2766 the altitude is relative to the current floor's base.<br>
2767 Syntax: <font face="Courier New, Courier, mono" size="2">AddCustomFloor
2768 <em>destobject, name, texturename, x1, z1, x2, z2, x3, z3, ..., altitude, tw,
2769 th</em></font><br>
2770 Example: <font face="Courier New, Courier, mono" size="2">AddCustomFloor
2771 external, My Wall, Brick, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0</font></p>
2772
2773 <p align="left"><strong>i. AddShaft</strong> - creates a shaft at a specified
2774 location and floor range<br>
2775 Syntax: <font face="Courier New, Courier, mono" size="2">AddShaft <em>number,
2776 centerx, centerz, startfloor, endfloor</em></font><br>
2777 Example: <font face="Courier New, Courier, mono" size="2">AddShaft 1, 10, 10,
2778 0, 9</font></p>
2779
2780 <p align="left">The <em>number</em> parameter specifies the shaft number to
2781 create. This command just tells the simulator the area that the shaft will take
2782 up, and does not create the actual shaft walls. Later on when you create the
2783 walls/floors for the shaft, make sure that you make a floor at the very bottom
2784 and very top of the shaft (they can extend beyond the walls).</p>
2785
2786 <p align="left"><strong>j. CreateStairwell</strong> - creates a stairwell at a
2787 specified location and floor range<br>
2788 Syntax: <font face="Courier New, Courier, mono" size="2">CreateStairwell
2789 <em>number, centerx, centerz, startfloor, endfloor</em></font><br>
2790 Example: <font face="Courier New, Courier, mono" size="2">CreateStairwell 1,
2791 10, 10, 0, 9</font></p>
2792
2793 <p align="left">The <em>number</em> parameter specifies the stairwell number to
2794 create. This command just tells the simulator the area that the stairwell will
2795 take up, and does not create the actual walls.</p>
2796
2797 <p align="left"><strong>k. WallOrientation</strong> - changes the internal wall
2798 orientation parameter, which is used for determining the wall thickness
2799 boundaries in relation to their coordinates.<br>
2800 Syntax:<font face="Courier New, Courier, mono" size="2"> WallOrientation =
2801 <em>direction</em></font><br>
2802 Example: <font face="Courier New, Courier, mono" size="2">WallOrientation =
2803 left</font></p>
2804
2805 <p align="left">The <em>direction</em> parameter can either be left, center, or
2806 right. Center is default. For example, if center is used, than half of the
2807 wall's thickness is to the right (positive) of it's x1/x2 or z1/z2 coordinates,
2808 and half is to the left (negative) of the coordinates. If left is used, than
2809 the coordinates define the wall's left (negative) edge, and the full thickness
2810 is to the right (positive) of those. If right is used, then again the
2811 coordinates define the wall's right (positive) edge, and the full thickness is
2812 to the left (negative) of those. See this graphic for a good example:</p>
2813
2814 <p align="left"><img src="guide/wall_info.jpg"></p>
2815
2816 <p align="left">In the graphic above, the large box at the top shows what the X
2817 and Z coordinates correspond to. The lower examples show the wall orientation
2818 as left or right, and if either the difference in x values or z values is
2819 larger.</p>
2820
2821 <p align="left"><strong>l. FloorOrientation</strong> - changes the internal
2822 floor orientation parameter, which is used for determining the floor thickness
2823 boundaries in relation to their coordinates.<br>
2824 Syntax:<font face="Courier New, Courier, mono" size="2"> FloorOrientation =
2825 <em>direction</em></font><br>
2826 Example: <font face="Courier New, Courier, mono" size="2">FloorOrientation =
2827 bottom</font></p>
2828
2829 <p align="left">The <em>direction</em> parameter can either be bottom, center,
2830 or top. Top is default. For example, if center is used, than half of the
2831 floor's thickness is above (positive) it's x1/x2 or z1/z2 coordinates, and half
2832 is below (negative) the coordinates. If bottom is used, than the coordinates
2833 define the floor's bottom edge, and the full thickness is the top (positive).
2834 If top is used, then again the coordinates define the floor's top edge, and the
2835 full thickness is the bottom (negative).</p>
2836
2837 <p align="left"><strong>m. DrawWalls</strong> - specifies which parts of a wall
2838 or floor should be drawn.<br>
2839 Syntax:<font face="Courier New, Courier, mono" size="2"> DrawWalls =
2840 <em>MainNegative, MainPositive, SideNegative, SidePositive, Top,
2841 Bottom</em></font><br>
2842 Example: <font face="Courier New, Courier, mono" size="2">DrawWalls = true,
2843 true, false, false, false, false</font></p>
2844
2845 <p align="left">The example shown is the default setting. <em>MainNegative</em>
2846 is the main (that makes up the front of a wall lengthwise, or the top area of a
2847 floor) face on the negative side, <em>MainPositive</em> is the main face on the
2848 positive side (back of a wall, or the bottom area of a floor),
2849 <em>SideNegative</em> is the side (the part that is along the thickness) face
2850 on the negative side, <em>SidePositive</em> is the side face on the positive
2851 side; <em>Top</em> refers to either the top side if a wall, or to the front
2852 face if a floor; <em>Bottom</em> refers to either the bottom side if a wall, or
2853 the back face if a floor. The following graphic explains the sides in detail:
2854 </p>
2855
2856 <p align="left"><img src="guide/sides.jpg"></p>
2857
2858 <p align="left"><strong>n. SetPlanarMapping</strong> - sets the planar texture
2859 mapper's parameters.<br>
2860 Syntax: <font face="Courier New, Courier, mono" size="2">SetPlanarMapping
2861 <em>Flat, FlipX, FlipY, FlipZ, Rotate</em></font><br>
2862 Example: <font face="Courier New, Courier, mono" size="2">SetPlanarMapping
2863 false, false, false, true, false</font></p>
2864
2865 <p align="left"><em>FlipX</em>, <em>FlipY</em> and <em>FlipZ</em> reverse the
2866 texture mapping per axis, and <em>Flat</em> has it ignore depth., Skyscraper by
2867 default uses a simple planar texture mapper, which in simple terms draws the
2868 texture in a box around the object. With a basic wall, the top-left of the
2869 texture image is mapped to the top left of the wall, the top-right is mapped to
2870 the top-right of the wall, etc. If you want the top-right of the texture mapped
2871 to the top-left of the wall for example (to flip or change alignment), you'd
2872 set <em>FlipX</em> to false. This command is mainly used to change alignment -
2873 since the top-left of the texture is mapped to the top-left of the object, that
2874 means that textures have a left/top alignment by default. If you change
2875 <em>FlipX</em> to true, it'll be right-aligned. If you change <em>FlipY</em> to
2876 true, it'll be bottom-aligned. <em>Rotate</em> has it rotate the texture
2877 mapping 90 degrees counterclockwise, so instead of the texture being mapped
2878 from the top left to bottom right, if <em>Rotate</em> is true, it'll be mapped
2879 from the bottom left to top right. See this picture for an example:</p>
2880
2881 <p align="left"><img src="guide/extents.jpg"></p>
2882
2883 <p align="left">In the above picture, I tiled a texture (a black box with
2884 yellow around it) 2.5 times on width and height. The bottom floor shows the
2885 default texture mapping (SetPlanarMapping false, false, false, false, false);
2886 you'll notice that it's aligned to the top-left. In the middle one, I set the
2887 <em>FlipX</em> value to true (SetPlanarMapping false, true, false, false, false).
2888 In the top one, I set the <em>FlipY</em> value to true (SetPlanarMapping false,
2889 false, true, false, false).</p>
2890
2891 <p align="left"><strong>o. SetTextureMapping</strong> - manually sets UV
2892 texture mapping for all polygons generated after this command;
2893 ResetTextureMapping restores the values to the defaults or previous<br>
2894 Syntax:<font face="Courier New, Courier, mono" size="2"> SetTextureMapping
2895 <em>vertex1, u1, v1, vertex2, u2, v2, vertex3, u3, v3</em></font><br>
2896 Example: <font face="Courier New, Courier, mono" size="2">SetTextureMapping 0,
2897 0, 0, 1, 1, 0, 2, 1, 1</font></p>
2898
2899 <p align="left">The example shown above is the default value used by the
2900 simulator. This command maps the texture coordinates to the specified 3 vertex
2901 indices - normally a side of a wall will have 4 vertices/sets of coordinates (0
2902 to 3), and by default the first three are used (top left, top right and bottom
2903 right respectively), with the UV coordinates representing the size percentage
2904 of the texture (with 1 being 100%, 0.5 being 50%, etc; normally this would
2905 relate to absolute texture coordinates) - so in the example, texture coordinate
2906 0,0 (top left) is mapped at the first vertex (top left); texture coordinate 1,0
2907 (really "width, 0") being mapped at the second vertex (top right), and texture
2908 coordinate 1,1 (really "width, height") being mapped to the bottom right. For a
2909 standard wall, the valid vertex values are from 0 to 3. If a wall or floor is
2910 created with AddCustomWall, and if it has for example 7 vertex points, the
2911 valid values for this command would then be 0 to 6 (but only 3 vertices can be
2912 used for mapping purposes). One caveat with manual texture mapping is that
2913 sometimes the simulator will automatically reverse the vertices to keep the
2914 wall faces oriented properly, so if you set your texture mapping this way and
2915 notice issues, try reversing the coordinates (u3 would be u1 for a 3-point
2916 triangular wall, etc) and see if that helps. Textures can also be cropped with
2917 this command - for example, to map only a central square of a texture, you'd
2918 use:<br>
2919 <font face="Courier New, Courier, mono" size="2">SetTextureMapping 0, 0.25,
2920 0.25, 1, 0.75, 0.25, 2, 0.75, 0.75</font></p>
2921
2922 <p align="left">Here's an easier way to see the example above:</p>
2923
2924 <p align="left"><font face="Courier New, Courier, mono" size="2">0 -&gt; 0,
2925 0<br>
2926 1 -&gt; 1, 0<br>
2927 2 -&gt; 1, 1</font></p>
2928
2929 <p align="left">The following diagram shows the mapping described above.
2930 Texture location 0,0 is mapped to wall vertex 0, location 1,0 is mapped to
2931 vertex 1, etc:</p>
2932
2933 <p align="left"><img src="guide/texture_mapping.jpg" width="300"
2934 height="300"></p>
2935
2936 <p align="left"><strong>p. SetTextureMapping2</strong> - advanced version of
2937 SetTextureMapping - manually sets UV texture mapping for all polygons generated
2938 after this command; ResetTextureMapping restores the values to the defaults or
2939 previous<br>
2940 Syntax:<font face="Courier New, Courier, mono" size="2"> SetTextureMapping2
2941 <em>v1x, v1y, v1z, u1, v1, v2x, v2y, v2z, u2, v2, v3x, v3y, v3z, u3,
2942 v3</em></font><br>
2943 Example: <font face="Courier New, Courier, mono" size="2">SetTextureMapping2
2944 x0, y0, z0, 0, 0, x1, y1, z1, 1, 0, x2, y2, z2, 1, 1</font></p>
2945
2946 <p align="left">See the above description of SetTextureMapping for a detailed
2947 description on texture mapping in general. This command mostly does the same as
2948 that command, and the example given is the default command (and is equivalent
2949 to the SetTextureMapping example). Instead of just choosing which vertex
2950 indices to use like SetTextureMapping, this command lets you create your own
2951 texture vertices (sets of coordinates) using coordinates of already-existing
2952 vertices. The vertex values that can be used start with an "x", "y" or "z",
2953 followed by the vertex index. In the example, the X, Y and Z values of the
2954 first vertex are mapped to UV coordinate 0,0 - this is because "x0, y0, z0" was
2955 specified. A specification of "x0, y2, z0" will use the X and Z values from
2956 vertex 0, but the Y value from vertex 2. This way you can specify coordinates
2957 outside of the wall/polygon's range. Here's an easier way to see the
2958 example:</p>
2959
2960 <p align="left"><font face="Courier New, Courier, mono" size="2">x0, y0, z0
2961 -&gt; 0, 0<br>
2962 x1, y1, z1 -&gt; 1, 0<br>
2963 x2, y2, z2 -&gt; 1, 1</font></p>
2964
2965 <p align="left"><strong>q. ResetTextureMapping</strong> - resets the texture
2966 mapping parameters to either the default or previous values<br>
2967 Syntax:<font face="Courier New, Courier, mono" size="2"> ResetTextureMapping =
2968 <em>default</em></font><br>
2969 Example: <font face="Courier New, Courier, mono" size="2">ResetTextureMapping =
2970 true </font></p>
2971
2972 <p align="left">If <em>default</em> is true, the texture mapping values are
2973 reset to the default, which is shown above in the SetTextureMapping's example.
2974 If <em>default</em> is false, the previous values will be loaded and used.</p>
2975
2976 <p align="left"><strong>r. ReverseAxis</strong> - this command is deprecated,
2977 and only used for older versions of the AddFloor commands, since the current
2978 ones have this option built-in. This reverses the axis that the difference in
2979 altitude/voffset for floors corresponds to. In the AddFloor command, there are
2980 parameters for specifying two different altitudes. By default, if the altitudes
2981 are different, the floor will angle upward/downward along the Z axis
2982 (front/back), but if this is set to true, the floor will angle along the X axis
2983 (left/right).<br>
2984 Syntax:<font face="Courier New, Courier, mono" size="2"> ReverseAxis =
2985 <em>value</em></font></p>
2986
2987 <p align="left"><strong>s. ShaftCut</strong> - used in conjunction with a shaft
2988 object - performs a vertical box cut on all floor objects (floors, ceilings,
2989 interfloor, etc) in the specified range.<br>
2990 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftCut <em>number,
2991 startx, startz, endx, endz, start_voffset, end_voffset</em></font><br>
2992 Example: <font face="Courier New, Courier, mono" size="2">ShaftCut 1, -4, -3.5,
2993 4, 3.5, 0, 5</font></p>
2994
2995 <p align="left"><em>Number</em> is the number of the shaft object to work with.
2996 <em>Startx</em>, <em>startz</em>, <em>endx</em>, and <em>endz</em> are two sets
2997 of coordinates that specify the cut box's start position and end position,
2998 relative to the shaft's central position. <em>Start_voffset</em> is the
2999 position above the starting floor's altitude to start the cut at, and
3000 <em>end_voffset</em> is the position above the ending floor's altitude to end
3001 the cut at. The example cuts a box for shaft 1, with a width from -4 to 4, and
3002 a length from -3.5 to 3.5, starting at the starting floor's altitude, and
3003 ending at 5 feet above the ending floor's altitude.</p>
3004
3005 <p align="left"><strong>t. CutStairwell</strong> - used in conjunction with a
3006 stairwell object - performs a vertical box cut on all floor objects (floors,
3007 ceilings, interfloor, etc) in the specified range. For the parameters, see the
3008 ShaftCut command.<strong><br>
3009 </strong>Syntax: <font face="Courier New, Courier, mono" size="2">CutStairwell
3010 <em>number, startx, startz, endx, endz, start_voffset,
3011 end_voffset</em></font><br>
3012 Example: <font face="Courier New, Courier, mono" size="2">CutStairwell 1, -4,
3013 -3.5, 4, 3.5, 0, 5</font></p>
3014
3015 <p align="left"><strong>u. Isect</strong> - the Isect function calculates the
3016 position that a line intersects with a certain object, such as a floor. Since
3017 this is a function, it can be used in-line anywhere.<br>
3018 Syntax:<font face="Courier New, Courier, mono" size="2"> isect(<em>destobject,
3019 objectname, startx, starty, startz, endx, endy, endz</em>)</font><br>
3020 Example: <font face="Courier New, Courier, mono" size="2">isect(external,
3021 wall1, 10, 10, 0, -10, 10, 0)</font><br>
3022
3023 <p align="left"><em>Destobject</em> is the destination object to get the object
3024 from (see the top of this section for more info). <em>Startx</em>,
3025 <em>starty</em>, and <em>startz</em> make up the position of the starting
3026 position, and <em>endx</em>, <em>endy</em> and <em>endz</em> make up the ending
3027 position. The first intersection of the named object is the return value, in
3028 "X, Y, Z" format (for example, "10, 1, 3").<br><br>
3029 For an example, start up the Simple building and enter this into the console:<br>
3030 <font face="Courier New, Courier, mono" size="2">print isect(external, front, 0, 5, -60, 0, 5, 0)</font><br><br>
3031 This command will do a line intersection from the camera's starting position, forward, and will print out the position that it intersects with the External mesh's "Front" wall, the one visible in front of you.
3032 </p>
3033
3034 <p align="left"><strong>v. SetAutoSize</strong> - enables or disables texture
3035 autosizing<br>
3036 Syntax:<font face="Courier New, Courier, mono" size="2"> SetAutoSize =
3037 <em>AutoWidth, AutoHeight </em></font><br>
3038 Example: <font face="Courier New, Courier, mono" size="2">SetAutoSize = true,
3039 true</font></p>
3040
3041 <p align="left">This command will determine if the simulator should
3042 automatically size texture appropriately when applied to an object, such as a
3043 wall or floor. By default, both are enabled. The <em>AutoWidth</em> and
3044 <em>AutoHeight</em> parameters correspond to the "<em>tw</em>" and
3045 "<em>th</em>" parameters of the <em>AddWall</em>, <em>AddFloor</em>, etc
3046 commands. If any are false, then the parameters specified in the
3047 <em>AddWall</em> etc commands multiply the texture values stored with with the
3048 <em>Load</em> or <em>LoadRange</em> commands (see below); those values relate
3049 to the number of times a texture is tiled; so if <em>AutoHeight</em> is set to
3050 False, "2" is specified in the "<em>th</em>" value of <em>AddWall</em>, and the
3051 texture's stored "th" value is 1, then the texture will be tiled twice
3052 vertically. If either are true, the specified value will me multiplied by the
3053 related stored texture value and then autoadjusted.</p>
3054
3055 <p align="left"><strong>w. TextureOverride</strong> - overrides textures for
3056 the next command. Currently works with the different AddWall, AddFloor,
3057 AddInterFloor and CreateWallBox/CreateWallBox2 commands.<br>
3058 Syntax:<font face="Courier New, Courier, mono" size="2"> TextureOverride
3059 <em>MainNegativeTex, MainPositiveTex, SideNegativeTex, SidePositiveTex, TopTex,
3060 Bottom</em></font><font face="Courier New, Courier, mono"
3061 size="2"><em>Tex</em></font><br>
3062 Example: <font face="Courier New, Courier, mono" size="2">TextureOverride
3063 Metal1, ElevFloor, Metal1, Metal1, Metal1, Metal1</font></p>
3064
3065 <p align="left">This command will allow you to specify multiple textures for a
3066 single command such as AddWall. It will only work on the command immediately
3067 after this one. In the above example, the Main Positive side of the object will
3068 have the texture "ElevFloor", but all other sides will use "Metal1".</p>
3069
3070 <p align="left"><strong>x. ShaftShowFloors</strong> - allows a range of floors
3071 to be shown in an elevator or shaft, primarily for glass elevators.<br>
3072 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftShowFloors
3073 <em>ShaftNumber</em> = <em>range/list[, full]</em></font><br>
3074 Example: <font face="Courier New, Courier, mono" size="2">ShaftShowFloors 1 = 1
3075 - 10</font><br>
3076 Example 2: <font face="Courier New, Courier, mono" size="2">ShaftShowFloors 1 = 1
3077 - 10, true</font></p>
3078
3079 <p align="left">The <em>full</em> parameter is optional, and if it is false or not specified (the default),
3080 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
3081 conjunction with the <em>Group</em> command for atriums.  If <em>full</em> is true, all the floors in
3082 the list or range are shown at a time, while the user is in the shaft, regardless of if the elevator
3083 is moving or not, and are disabled when the user exits the shaft.  In the first example above, let's say the user
3084 is in an elevator in shaft 1, and is moving upwards from the 2nd floor. In this situation, floors 1 to 10
3085 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,
3086 those floors will be disabled.  In the second example, when the user enters the shaft or elevator, floors
3087 1 to 10 will all be enabled, and when they exit the elevator/shaft, those floors will be disabled.
3088 For a basic glass elevator, the second example would be used, along with the <em>Group</em> command to group
3089 floors 1 to 10 together.</p>
3090
3091 <p align="left"><strong>y. ShaftShowInterfloors</strong> - display specific
3092 interfloors while inside a shaft.  This is primarily for pipe/utility shafts.<br>
3093 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftShowInterfloors
3094 <em>ShaftNumber</em> = <em>range/list</em></font><br>
3095 Example: <font face="Courier New, Courier, mono" size="2">ShaftShowInterfloors 1 =
3096 1 - 10</font></p>
3097
3098 <p align="left"><strong>z. ShaftShowOutside</strong> - allows objects outside
3099 the building (sky, landscape, etc) to be enabled while the user is both inside
3100 the specified shaft and on one of the specified floors - primarily for glass
3101 elevators.<br>
3102 Syntax:<font face="Courier New, Courier, mono" size="2"> ShaftShowOutside
3103 <em>ShaftNumber</em> = <em>range/list</em></font><br>
3104 Example: <font face="Courier New, Courier, mono" size="2">ShaftShowOutside 1 =
3105 1 - 10</font></p>
3106
3107 <p align="left">In the above example, if a user is riding an elevator in shaft
3108 1, the outside (sky, landscape, etc) will be enabled while the elevator is on
3109 any of the floors from 1 to 10. Once the elevator reaches the 11th floor, the
3110 outside will be disabled. This command can be mixed with
3111 <em>ShaftShowFloors</em> for mixed atrium/external glass elevators such as the
3112 ones in the Glass Tower, where the elevator moves upwards through an indoor
3113 atrium, and eventually outside above the atrium. In that situation, the floors
3114 that comprise the lower (atrium) section would be specified using
3115 <em>ShaftShowFloors</em> (such as 1-10), while the upper (outdoor) floors would
3116 be specified using <em>ShaftShowOutside</em> (such as 11-20).</p>
3117
3118 <p align="left"><strong>aa. ShowFullShaft</strong> - determines if an entire
3119 shaft should always be shown, such as a glass elevator track.<br>
3120 Syntax:<font face="Courier New, Courier, mono" size="2"> ShowFullShaft
3121 <em>ShaftNumber</em> = <em>value</em></font><br>
3122 Example: <font face="Courier New, Courier, mono" size="2">ShowFullShaft 1 =
3123 true</font></p>
3124
3125 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ab.
3126 StairsShowFloors</strong> - allows a range of floors to be shown while inside
3127 the specified stairwell.<br>
3128 Syntax:<font face="Courier New, Courier, mono" size="2"> StairsShowFloors
3129 <em>StairwellNumber</em> = <em>range/list</em></font><br>
3130 Example: <font face="Courier New, Courier, mono" size="2">StairsShowFloors 1 =
3131 1 - 10</font><br>
3132 In the above example, let's say the user is in stairwell 1, and is walking
3133 upwards from the 2nd floor. In this situation, the 2nd floor will be
3134 visible/enabled while they're walking up (since it was in the range specified
3135 with this command), but when they reach the 11th floor, that floor will be
3136 invisible/disabled.</p>
3137
3138 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ac.
3139 ShowFullStairs</strong> - determines if an entire stairwell should be shown.  If
3140 set to "true" or "inside", the full stairwell is shown only when the user is inside the stairwell. If
3141 set to "always", the full stairwell is always shown.
3142 Setting this to true is useful for stairwells that have a gap in the center
3143 between the actual stairs.<br>
3144 Syntax:<font face="Courier New, Courier, mono" size="2"> ShowFullStairs
3145 <em>StairwellNumber</em> = <em>value</em></font><br>
3146 Example: <font face="Courier New, Courier, mono" size="2">ShowFullStairs 1 = inside</font></p>
3147
3148 <p align="left"><strong>ad. TextureFlip</strong> - flips specified textures for
3149 the next command.. Currently only works with the different AddWall, AddFloor
3150 and AddInterFloor commands. The values available are 0 for no flipping, 1 for
3151 horizontal flip, 2 for vertical flip, and 3 for both horizontal and
3152 vertical.<br>
3153 Syntax:<font face="Courier New, Courier, mono" size="2"> TextureFlip
3154 <em>MainNegative, MainPositive, SideNegative, SidePositive, Top,
3155 Bottom</em></font><br>
3156 Example: <font face="Courier New, Courier, mono" size="2">TextureFlip 1, 1, 0,
3157 0, 0, 0</font></p>
3158
3159 <p align="left">This command will allow you to flip textures on specific parts
3160 of a wall or floor created with a command such as AddWall. It will only work on
3161 the command immediately after this one. In the above example, the Main Positive
3162 and Main Negative sides of the object will have their textures flipped
3163 horizontally.</p>
3164
3165 <p align="left"><strong>ae. Cut</strong> - performs a manual box cut on an
3166 object<br>
3167 Syntax: <font face="Courier New, Courier, mono" size="2">Cut <em>destobject,
3168 x1, y1, z1, x2, y2, z2, cutwalls, cutfloors</em><br>
3169 </font>Example: <font face="Courier New, Courier, mono" size="2">Cut external,
3170 -5, -5, -5, 5, 5, 5, false, true</font></p>
3171
3172 <p align="left">The <em>x</em>, <em>y</em> and <em>z</em> values specify the
3173 start and end coordinates of the box cut. If <em>cutwalls</em> is true, the
3174 function will cut walls; if <em>cutfloors</em> is true, it'll cut floors.</p>
3175
3176 <p align="left"><strong>af. Mount</strong> - mounts a zip file in the data
3177 directory into a virtual path.<br>
3178 Syntax: <font face="Courier New, Courier, mono" size="2">Mount
3179 <em>filename</em>, <em>path</em></font><br>
3180 Example: <font face="Courier New, Courier, mono" size="2">Mount myfile.zip,
3181 mydirectory</font></p>
3182
3183 <p align="left">In this example, the file myfile.zip located in Skyscraper's
3184 data directory will be mounted as "mydirectory", and so a file such as test.jpg
3185 inside that zip file will appear as "mydirectory/test.jpg".</p>
3186
3187 <p align="left"><strong>ag. AddFloorAutoArea</strong> - defines an area that
3188 will automatically enable and disable floors when the user moves within it,
3189 similar to a stairwell<br>
3190 Syntax: <font face="Courier New, Courier, mono" size="2">AddFloorAutoArea
3191 <em>x1, y1, z1, x2, y2, z2</em></font><br>
3192 Example: <font face="Courier New, Courier, mono" size="2">AddFloorAutoArea
3193 -100, 0, -100, 100, 100, 100</font></p>
3194
3195 <p align="left"><strong>ah. AddSound</strong> - creates a user-defined sound at
3196 the specified position<br>
3197 Syntax: <font face="Courier New, Courier, mono" size="2">AddSound <em>name,
3198 filename, x, y, z, loop[, volume, speed, min_distance, max_distance,
3199 doppler_level, cone_inside_angle, cone_outside_angle, cone_outside_volume,
3200 direction_x, direction_y, direction_z]</em></font><br>
3201 Example 1: <font face="Courier New, Courier, mono" size="2">AddSound MySound,
3202 sound.wav, 10, 100, 5, true<br>
3203 </font>Example 2: <font face="Courier New, Courier, mono" size="2">AddSound
3204 MySound, ambient.ogg, 10, 100, 5, true, 1, 100, 1, -1, 0, 360, 360, 1, 0, 0,
3205 0</font></p>
3206
3207 <p align="left">This command creates a custom sound in the specified position,
3208 and has a number of optional parameters - the defaults for the optional
3209 parameters are shown in Example 2. <em>Loop</em> specifies if the sound should
3210 loop and play on startup. If you're going to use any of the optional
3211 parameters, you must specify them all. <em>X</em>, <em>Y</em> and <em>Z</em>
3212 specify the location in 3D space that the sound will be at, <em>volume</em>
3213 specifies the volume percentage (with 1.0 being 100%) of the sound,
3214 <em>speed</em> determines the playback speed of the sound in percent,
3215 <em>min_distance</em> and <em>max_distance</em> set the minimum and maximum
3216 distances that the sound can be heard at full volume - by default, minimum is 1
3217 and maximum is -1. <em>Doppler_level </em>specifies the doppler scale for the
3218 sound (0 means off, the default, 1 is normal, 5 is max).
3219 <em>Cone_inside_angle</em> is the angle within which the sound is at it's
3220 normal volume (default 360), <em>cone_outside_angle</em> is the outside angle
3221 that the sound is at it's normal volume (default 360, shouldn't be less than
3222 the inside angle), and <em>cone_outside_volume</em> is the volume level of the
3223 sound outside (0.0 to 1.0, default 1.0)<em>. Direction_x</em>,
3224 <em>direction_y</em> and <em>direction_z</em> specify the direction of the
3225 sound cone.</p>
3226
3227 <p align="left"><strong>ai. GetWallExtents</strong> - the GetWallExtents
3228 command returns the X and Z extents (minimum and maximum values) of a wall, at
3229 the specified altitude. The command will return the results in the MinX, MinZ,
3230 MaxX and MaxZ variables.<br>
3231 Syntax:<font face="Courier New, Courier, mono" size="2"> GetWallExtents
3232 <em>destobject, wallname, altitude</em></font><br>
3233 Example: <font face="Courier New, Courier, mono" size="2">GetWallExtents
3234 external, wall1:front, 10</font></p>
3235
3236 <p align="left">Then to use the values:<br>
3237 Example: <font face="Courier New, Courier, mono" size="2">Set 2 =
3238 %minz%</font></p>
3239
3240 <p align="left"><em>Destobject</em> is the destination object to get the object
3241 from (see the top of this section for more info). <em>Wallname </em>specifies
3242 the name of the wall to get the extents from. Generally this should be in the
3243 form of "name:side", but if you leave out the "side" parameter, it'll choose
3244 one of the sides from a pre-defined search list. Sides of walls made from any
3245 AddWall command generally have "front", "back", "left" and "right" sides. Walls
3246 made using AddCustomWall and AddTriangleWall have sides of "0" (front) and "1"
3247 (back), so with those you'd specify "name:0" for the front. <em>Altitude</em>
3248 specifies the altitude to use for the check - basically it makes a copy of the
3249 wall, cuts it down to a line at that altitude, and returns the coordinates of
3250 the endpoints. The command will store the results in the MinX, MinZ, MaxX and
3251 MaxZ variables, which can be used anywhere in the script - to get the minimum X
3252 result, you'd use %minx%.</p>
3253
3254 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aj.
3255 AddAction</strong> - defines an action, to be used by custom controls and
3256 triggers.<br>
3257 Syntax:<font face="Courier New, Courier, mono" size="2"> AddAction <em>name,
3258 parent_object, command[, parameters</em></font><em>]<br>
3259 </em>Example:<font face="Courier New, Courier, mono" size="2"> AddAction
3260 MyAction, Floor 2, ChangeTexture, OldTexture, NewTexture</font><br>
3261 Example:<font face="Courier New, Courier, mono" size="2"> AddAction
3262 MySoundAction, Floor 2, PlaySound, Sound1, false</font><br>
3263 </p>
3264
3265 <p style="text-align:left;margin-left:0;margin-right:auto;">This command
3266 creates a global action, to be used with commands such as
3267 <em>AddActionControl</em> and <em>AddTrigger</em>. <em>Name</em> must be a
3268 globally-unique name. If the same name is used for multiple actions, all of
3269 those actions will be run when an object uses that name. <em>Parent_object</em>
3270 is the object to use to perform the action on. Currently includes "Global",
3271 floors such as "Floor 2", elevators such as "Elevator 1", elevator cars such
3272 as "Elevator 1:Car 2", shafts like "Shaft 1",
3273 stairwells like "Stairwell 2", call buttons such as "Floor 0:Call Panel 1",
3274 and can also be specified as a range of objects, such as "Floors 3 to 8".</p>
3275
3276 <p style="text-align:left;margin-left:0;margin-right:auto;">Commands and
3277 parameters:</p>
3278
3279 <p style="text-align:left;margin-left:0;margin-right:auto;">(General)<br>
3280 <em>ChangeTexture</em>: oldtexture, newtexture<br>
3281 <em>PlaySound</em>: name, loop true/false<br>
3282 <em>OpenShaftDoor</em>: door number (0 for all), floor number (parent needs to
3283 be the elevator object)<br>
3284 <em>CloseShaftDoor</em>: door number (0 for all), floor number (parent needs to
3285 be the elevator object)<br>
3286 <em>OpenShaftDoorManual</em>: door number (0 for all), floor number (parent
3287 needs to be elevator object)<br>
3288 <em>CloseShaftDoorManual</em>: door number (0 for all), floor number (parent
3289 needs to be elevator object)<br>
3290 <em>AccessDown</em>: floor number (parent needs to be elevator object)<br>
3291 <em>AccessOff</em>: floor number (parent needs to be elevator object)<br>
3292 <em>AccessUp</em>: floor number (parent needs to be elevator object)<br>
3293 (for other elevator commands, see the AddControl command in the elevator
3294 section)</p>
3295
3296 <p style="text-align:left;margin-left:0;margin-right:auto;">The
3297 <em>PlaySound</em> command plays sounds created with the AddSound command. With
3298 this command, if multiple sounds have the same name, all of those sounds will
3299 be played simultaneously when the related action is run.</p>
3300
3301 <p style="text-align:left;margin-left:0;margin-right:auto;">OpenShaftDoor
3302 example, to open elevator 1's shaft doors on floor 2:</p>
3303
3304 <p style="text-align:left;margin-left:0;margin-right:auto;"><font
3305 face="Courier New, Courier, mono" size="2">AddAction MyDoorOpen, Elevator 1,
3306 OpenShaftDoor, 0, 2</font></p>
3307
3308 <p style="text-align:left;margin-left:0;margin-right:auto;">PlaySound example,
3309 to play sound FireAlarm created using the AddSound command on Floor 1:</p>
3310
3311 <p style="text-align:left;margin-left:0;margin-right:auto;"><font
3312 face="Courier New, Courier, mono" size="2">AddAction MySound, Floor 1,
3313 FireAlarm, true</font></p>
3314
3315 <p style="text-align:left;margin-left:0;margin-right:auto;">The
3316 <em>Access</em> commands enable and disable Hoistway Access Mode on the elevator, which is part of Inspection Mode.<br>
3317 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 will move upwards at leveling speed.  If <em>AccessDown</em> is set, the elevator will 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>
3318
3319 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ak.
3320 AddActionControl</strong> - creates a custom control that uses a specific
3321 action defined by AddAction.<br>
3322 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionControl
3323 <em>name, sound, direction, centerx, centerz, width, height, voffset,
3324 selection_position, action_name(s), texture_name(s)<br>
3325 </em></font>Example: <font face="Courier New, Courier, mono"
3326 size="2">AddActionControl MyControl, switch.wav, front, -10, 10, 1.5, 1.5, 4,
3327 1, UndoMyAction, MyAction, Touch, TouchLit<br>
3328 </font><br>
3329 AddActionControl command creates an advanced control similar to elevator button
3330 panel controls, but assigned to an action created with the AddAction command.
3331 The <em>action_name(s)</em> and <em>texture_name(s)</em> parameters allow you
3332 to specify a list of actions, and a list of textures to go along with those
3333 actions. There needs to be a texture for every action; if you specify 3 actions
3334 and only 2 textures, you will get an error. The control starts up in the first
3335 action, and switches to the next actions in sequence when it's clicked.
3336 <em>Direction</em> is the direction the control itself will face in 3D space
3337 (front, left, right, back). Leave the sound field blank for no sound to be
3338 played.  <em>Selection_position</em> is the selection position to start at,
3339 which is normally 1.</p>
3340
3341 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>al.
3342 AddTrigger</strong> - creates a trigger that is used to signal an action when
3343 the user's camera enters or leaves the defined area.<br>
3344 Syntax:<font face="Courier New, Courier, mono" size="2"> AddTrigger <em>name,
3345 sound, start_x, start_y, start_z, end_x, end_y, end_z, action_names(s)<br>
3346 </em></font>Example:<font face="Courier New, Courier, mono"
3347 size="2"> AddTrigger MyTrigger, switch.wav, -30, 0, -30, -20, 10, -20,
3348 UndoMyAction, MyAction</font><br>
3349 <br>
3350 AddTrigger creates a trigger similar to action controls (AddActionControl) and
3351 elevator controls. The <em>action_names(s)</em> parameter allows you to specify
3352 a list of actions that this trigger will call when the camera enters or exits
3353 the area. The trigger starts in the first action, and will switch to each
3354 consecutive action when the users enters/leaves. The <em>X</em>, <em>Y</em> and
3355 <em>Z</em> parameters specify the 3D box that defines the trigger area. Leave
3356 the <em>sound</em> field blank for no sound to be played.</p>
3357
3358 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>am.
3359 AddModel</strong> - adds a global 3D model. If a filename is specified, the model's
3360 textures/materials must be defined in a separate ".material" file, and a
3361 separate collider mesh ".collider" will be loaded. In that situation, if a collider mesh isn't
3362 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>
3363 Syntax: <font face="Courier New, Courier, mono" size="2">AddModel<em> name,
3364 filename, center, CenterX, CenterY, CenterZ, RotationX, RotationY, RotationZ,
3365 MaxRenderDistance, ScaleMultiplier, EnablePhysics, Restitution, Friction,
3366 Mass</em><em><br>
3367 </em></font>Example 1:<font face="Courier New, Courier, mono" size="2"> AddModel
3368 MyModel, cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, false, 0, 0, 0</font><br>
3369 Example 2:<font face="Courier New, Courier, mono" size="2"> AddModel MyModel,
3370 cube.mesh, true, 0, 0, 0, 0, 0, 0, 0, 1, true, 0.1, 0.5, 0.1</font><br>
3371 Example 3:<font face="Courier New, Courier, mono" size="2"> AddModel MyModel,
3372 , false, 0, 0, 0, 0, 0, 0, 0, 1, true, 0.1, 0.5, 0.1</font></p>
3373
3374 <p></p>
3375
3376 <p align="left">The <em>Center</em> value is either true or false, and
3377 determines if the loaded model should be automatically centered, otherwise the
3378 exact mesh positioning in the model file will be used.
3379 <em>MaxRenderDistance</em>
3380 determines the maximum distance in feet that the object will be shown (0 means
3381 unlimited). <em>ScaleMultiplier</em> allows you to change the size of the
3382 object during the load - for example, set to 2 to double the size. Model files are
3383 in the OGRE native mesh format. In the example, the material/texture file is
3384 cube.material, and the optional collider mesh file is cube.collider.
3385 <em>EnablePhysics</em> enables Bullet physics on the object (physics will only
3386 work if you don't provide a collider mesh), and <em>Restitution</em>,
3387 <em>Friction</em> and <em>Mass</em> determine the physical properties of the
3388 object.</p>
3389
3390 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>an.
3391 CreateWallObject</strong> - creates a custom wall object, in the specified mesh object.
3392 Wall objects are used to contain a number of polygons, to represent a wall structure, and are normally automatically created by other commands.
3393 The AddPolygon command is used with this command, to create the polygons.<br>
3394 Syntax:<font face="Courier New, Courier, mono" size="2"> CreateWallObject
3395 <em>destobject, name</em></font><br>
3396 Example: <font face="Courier New, Courier, mono" size="2">CreateWallObject landscape, mywall</font></p>
3397
3398 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ao. AddPolygon</strong> - this is the same as the AddCustomWall command,
3399 but adds the custom polygon to an existing (usually custom) wall object, instead of creating a new one.
3400 The example below adds the polygon to the Landscape mesh object, to the custom-created "mywall" Wall Object,
3401 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>
3402 Syntax: <font face="Courier New, Courier, mono" size="2">AddPolygon
3403 <em>destobject, wallname, texturename, x1, y1, z1, x2, y2, z2, x3, y3, z3, ..., tw,
3404 th</em></font><br>
3405 Example: <font face="Courier New, Courier, mono" size="2">AddPolygon
3406 landscape, mywall, Brick, 0, 0, 0, 0, 10, 0, 10, 10, 0, 10, 0, 10, 0,
3407 0</font></p>
3408
3409 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ap.
3410 SetKey</strong> - specifies that the next created model will be a key. The
3411 model will be tagged with a specific key ID number, and when clicked, the key
3412 ID will be added to the user's keyring and the model will be deleted. The value
3413 must be greater than 0.<br>
3414 Syntax:<font face="Courier New, Courier, mono" size="2"> SetKey
3415 <em>keyid</em></font><br>
3416 Example: <font face="Courier New, Courier, mono" size="2">SetKey 1</font></p>
3417
3418 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aq.
3419 SetLock</strong> - sets the lock and key parameters for subsequent doors,
3420 controls/buttons, and call buttons that are created.<br>
3421 Syntax:<font face="Courier New, Courier, mono" size="2"> SetLock
3422 <em>locked</em>, <em>keyid</em></font><br>
3423 Example: <font face="Courier New, Courier, mono" size="2">SetLock 1, 3</font></p>
3424
3425 <p style="text-align:left;margin-left:0;margin-right:auto;">For doors,
3426 <em>locked</em> specifies which sides (directions) are locked. Values are:<br>
3427 0 - unlocked<br>
3428 1 - negative-facing (left/front) side locked<br>
3429 2 - positive-facing (right/back) side locked<br>
3430 3 - both sides locked</p>
3431
3432 <p style="text-align:left;margin-left:0;margin-right:auto;">For
3433 controls/buttons and call buttons, the <em>locked</em> values are:<br>
3434 0 - unlocked<br>
3435 1 - locked</p>
3436
3437 <p style="text-align:left;margin-left:0;margin-right:auto;">Locked objects can
3438 only be unlocked if the person has the key number specified as <em>keyid</em>.
3439 If <em>keyid</em> is 0, no key is needed to lock or unlock. To reset to the
3440 defaults, use 0 for the <em>locked</em> setting and 0 for <em>keyid</em>.<br>
3441 </p>
3442
3443 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ar.
3444 Print</strong> - prints the contents of a line to the console. This command
3445 will still convert variables and even math expressions, and output the
3446 results.<br>
3447 Syntax: <font face="Courier New, Courier, mono" size="2">Print
3448 <em>text</em></font><br>
3449 Example: <font face="Courier New, Courier, mono" size="2">Print 1+1</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>as.
3454 Delete</strong> - deletes an object. This command is normally used after a
3455 building has loaded.<br>
3456 Syntax: <font face="Courier New, Courier, mono" size="2">Delete
3457 <em>object_number</em></font><br>
3458 Example: <font face="Courier New, Courier, mono" size="2">Delete 12</font></p>
3459
3460 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3461
3462 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>at.
3463 RunAction</strong> - runs an action by name. This command is normally used
3464 after a building has loaded.<br>
3465 Syntax: <font face="Courier New, Courier, mono" size="2">RunAction
3466 <em>name</em></font><br>
3467 Example: <font face="Courier New, Courier, mono" size="2">RunAction
3468 myaction</font></p>
3469
3470 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3471
3472 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>au.
3473 AddActionParent</strong> - adds a parent object to an existing action. See the
3474 AddAction command for details on parent objects<br>
3475 Syntax: <font face="Courier New, Courier, mono" size="2">AddActionParent
3476 <em>name, object</em></font><br>
3477 Example: <font face="Courier New, Courier, mono" size="2">AddActionParent
3478 myaction, Elevator 2</font><br>
3479 Example: <font face="Courier New, Courier, mono" size="2">AddActionParent
3480 myaction, Floors 2 to 5</font></p>
3481
3482 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3483
3484 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>av.
3485 RemoveActionParent</strong> - removes a parent object from an existing action.
3486 See the AddAction command for details on parent objects. This command is
3487 normally used after a building has loaded.<br>
3488 Syntax: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3489 <em>name, object</em></font><br>
3490 Example: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3491 myaction, Elevator 2</font><br>
3492 Example: <font face="Courier New, Courier, mono" size="2">RemoveActionParent
3493 myaction, Floors 2 to 5</font></p>
3494
3495 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3496
3497 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>aw.
3498 GotoFloor</strong> - jumps the user to the specified floor. This command is
3499 normally used after a building has loaded.<br>
3500 Syntax: <font face="Courier New, Courier, mono" size="2">GotoFloor
3501 <em>floor</em></font><br>
3502 Example: <font face="Courier New, Courier, mono" size="2">GotoFloor 3</font></p>
3503
3504 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3505
3506 <p align="left"><strong>ax. EndPoint</strong> - the EndPoint function
3507 calculates endpoint coordinates given a starting point, direction (angle in
3508 degrees), and distance.<br>
3509 Syntax:<font face="Courier New, Courier, mono" size="2"> endpoint(<em>startx,
3510 starty, angle, distance</em>)</font><br>
3511 Example: <font face="Courier New, Courier, mono" size="2">endpoint(-150, 150,
3512 180, 20)</font><br>
3513 Result: <font face="Courier New, Courier, mono" size="2">-150, 130</font></p>
3514
3515 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3516
3517 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ay.
3518 FloorInfo</strong> - show information on all floors or optionally a specified floor<br>
3519 Syntax: <font face="Courier New, Courier, mono" size="2">FloorInfo
3520 <em>[number]</em></font><br>
3521 Example: <font face="Courier New, Courier, mono" size="2">FloorInfo 3</font></p>
3522
3523 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3524
3525 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>az.
3526 ListTextures</strong> - list the loaded texture names (materials) and filenames<br>
3527
3528 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3529
3530 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>ba.
3531 ListVisibleMeshes</strong> - list the mesh objects currently visible by the camera<br>
3532
3533 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3534
3535 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>bb.
3536 ShowLoadedSounds</strong> - show the sounds currently loaded in the sound system, and the number of associated sound objects for each one<br>
3537
3538 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3539
3540 <p style="text-align:left;margin-left:0;margin-right:auto;"><strong>bc.
3541 ShowPlayingSounds</strong> - show the sounds currently playing in the sound system, with each filename followed by a listing of playing sound objects<br>
3542
3543 <p style="text-align:left;margin-left:0;margin-right:auto;"></p>
3544
3545 <p></p>
3546
3547 <p align="left"> </p>
3548
3549 <p align="left"><strong>8. END command</strong></p>
3550
3551 <p align="left">The End command tells the software to stop processing the
3552 current script and start the simulation. This is optional.<br>
3553 Example: <font face="Courier New, Courier, mono" size="2">&lt;end&gt;</font></p>
3554
3555 <p align="left"><br>
3556 <strong>9. BREAK command</strong></p>
3557
3558 <p align="left">The Break command triggers a break section in the script
3559 processor, and is used when running a debug build of the simulator, with a
3560 debugger attached. A breakpoint can be set on the associated line in
3561 fileio.cpp, and when this command is called, the debugger will hit the
3562 breakpoint.<br>
3563 Example: <font face="Courier New, Courier, mono"
3564 size="2">&lt;break&gt;</font></p>
3565
3566 <p align="left"> </p>
3567
3568 <p align="left"><strong><font size="+1"><a name="Functions"
3569 id="Functions"></a>9. Predefined Functions</font></strong></p>
3570
3571 <p align="left">There are a number of script functions provided by the
3572 simulator. Currently there's only a single script for elevator doors - see the
3573 Simple building (noted at the bottom of this page) for an example. These
3574 functions can be used by putting this line in your script:</p>
3575
3576 <p align="left"><font face="Courier New, Courier, mono" size="2">&lt;Include
3577 data/scripts/elevator_doors.txt&gt;</font></p>
3578
3579 <p align="left">You'll then be able to use some predefined door functions:</p>
3580
3581 <p align="left"><strong>1. elevdoor_single</strong> - creates a single-slide
3582 elevator door.<br>
3583 Syntax: <font face="Courier New, Courier, mono"
3584 size="2">elevdoor_single(<em>door_number, texture, side_texture, thickness,
3585 CenterX, CenterZ, width, height, door_direction, movement_direction, speed,
3586 is_shaft_door</em>)</font></p>
3587
3588 <p align="left"><em>Door_Direction</em> is either "left", "right", "front" or
3589 "back" and is the direction the doors face (torwards the outside of the
3590 elevator). <em>Movement_direction</em> is the direction the door should
3591 move.</p>
3592
3593 <p align="left"><strong>2. elevdoor_center</strong> - creates a center-open
3594 elevator door.<br>
3595 Syntax: <font face="Courier New, Courier, mono"
3596 size="2">elevdoor_center(<em>door_number, texture, side_texture, thickness,
3597 CenterX, CenterZ, width, height, door_direction, speed,
3598 is_shaft_door</em>)</font></p>
3599
3600 <p align="left"><strong>3. elevdoor_center_classic</strong> - creates a
3601 center-open elevator door with a partially open interior door.<br>
3602 Syntax: <font face="Courier New, Courier, mono"
3603 size="2">elevdoor_center_classic(<em>door_number, texture, side_texture,
3604 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3605 is_shaft_door</em>)</font></p>
3606
3607 <p align="left"><strong>4. elevdoor_dualspeed_left</strong> - creates a
3608 dual-speed door that opens to the left<br>
3609 Syntax: <font face="Courier New, Courier, mono"
3610 size="2">elevdoor_dualspeed_left(<em>door_number, texture, side_texture,
3611 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3612 is_shaft_door</em>)</font></p>
3613
3614 <p align="left"><strong>5. </strong><strong>elevdoor_dualspeed_right</strong> -
3615 creates a dual-speed door that opens to the right<br>
3616 Syntax: <font face="Courier New, Courier, mono"
3617 size="2">elevdoor_dualspeed_right(<em>door_number, texture, side_texture,
3618 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3619 is_shaft_door</em>)</font></p>
3620
3621 <p align="left"><strong>6. </strong><strong>elevdoor_center_dualspeed</strong>
3622 - creates a dual-speed center-open door<br>
3623 Syntax: <font face="Courier New, Courier, mono"
3624 size="2">elevdoor_center_dualspeed(<em>door_number, texture, side_texture,
3625 thickness, CenterX, CenterZ, width, height, door_direction, speed,
3626 is_shaft_door</em>)</font></p>
3627
3628 <p align="left"> </p>
3629
3630 <div align="center">
3631 <p align="left"><strong><font size="+1"><a name="Buildings"></a>10. The
3632 <em>Buildings</em> Section</font></strong></p>
3633
3634 <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>
3635 <br>The section starts with this header:<br>
3636 <font face="Courier New, Courier, mono" size="2">&lt;Buildings&gt;</font></p>
3637
3638 <p align="left">and ends with this footer:<br>
3639 <font face="Courier New, Courier, mono" size="2">&lt;EndBuildings&gt;</font></p>
3640
3641 <p align="left"><strong>Parameters (all are optional):</strong></p>
3642
3643 <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>
3644 Example: <font face="Courier New, Courier, mono" size="2">ConcurrentLoads = true</font></p>
3645
3646 <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>
3647 <font face="Courier New, Courier, mono" size="2">CutLandscape = true</font><br>
3648
3649 <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>
3650 <font face="Courier New, Courier, mono" size="2">CutBuildings = true</font><br>
3651
3652 <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>
3653 <font face="Courier New, Courier, mono" size="2">CutExternal = true</font><br>
3654
3655 <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>
3656 <font face="Courier New, Courier, mono" size="2">CutFloors = true</font><br>
3657
3658 <p align="left"><strong>Commands:</strong></p>
3659
3660 <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>
3661 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>
3662 Example 1: <font face="Courier New, Courier, mono" size="2">Load Simple.bld</font><br>
3663 Example 2: <font face="Courier New, Courier, mono" size="2">Load Simple.bld, 200, 0, 200, 0</font><br>
3664 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>
3665 Example 4: <font face="Courier New, Courier, mono" size="2">Load myfolder/mybuilding.bld</font><br>
3666
3667 <p align="left"> </p>
3668
3669 <p align="left"><strong><font size="+1"><a name="Example"></a>11. Small Example
3670 Building</font></strong></p>
3671
3672 <p align="left">To see an example of a small simplistic building in code, look
3673 at the Simple.bld file in Skyscraper's buildings directory. It's also available
3674 online <a
3675 href="http://svn.tliquest.net/viewvc/skyscraper/trunk/buildings/Simple.bld?view=co">here</a>.</p>
3676
3677 <p align="left"> </p>
3678 </div>
3679 </body>
3680 </html>