1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <title>Skyscraper Building Design Guide</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
10 <p><strong><font size="+2">Skyscraper 1.7<br>
11 Building Design Guide<br>
12 </font></strong>Copyright (C)2005-2010 Ryan Thoryk</p>
14 <p align="left">This document describes how to create your own buildings for
15 the Skyscraper simulator, and also describes all of the available commands.
16 Please note that the commands and syntax will change frequently during the
17 simulator's development, and formatting will be cleaned up to make the code
18 more readable. A graphical building designer is planned, which will generate
19 these script files based on simplified CAD-like floorplan layouts, and will
20 also allow the user to view the building in 3D as it's being created.</p>
21 <p align="left"> </p>
22 <p align="center"><font size="+1"><strong><u>Contents</u></strong></font></p>
23 <p align="center"><a href="#Start">Starting a new building</a></p>
24 <p align="center"><a href="#General">General Stuff</a></p>
25 <p align="center"> <a href="#Globals">Globals Section</a></p>
26 <p align="center"> <a href="#Textures">Textures Section</a></p>
27 <p align="center"><a href="#Floor">Floor Sections</a></p>
28 <p align="center"><a href="#Elevator">Elevator Sections</a></p>
29 <p align="center"><a href="#Functions">Predefined Functions</a></p>
30 <p align="center"><a href="#Example">Example Building</a></p>
31 <p align="left"> </p>
32 <p align="left"><strong><font size="+1"><a name="Start"></a>1. Starting a new
33 building</font></strong></p>
34 <p align="left">Buildings are stored in text files in Skyscraper's <em>buildings</em>
35 folder, usually at c:\program files\skyscraper\buildings on Windows, or in
36 the "buildings" directory on Unix. The filenames end in BLD, and
37 so you need to make sure your text file ends with ".bld" and not
38 ".txt". To create a new building, first open up a text editor, and
39 read the instructions below. When you're finished, save it into the <em>buildings</em>
40 folder shown above, as something like "mybuilding.bld". The building
41 will appear in Skyscraper's buildings list the next time you run it. A simplistic
42 building is included for you to get a good idea of the overall format of a
43 typical building data file. You might also want to open one of the other buildings
44 that come with Skyscraper ("Triton Center.bld", "Glass Tower.bld",
45 etc) for examples on the more advanced functions. Please note that the script
46 syntax will change in the future.</p>
47 <p align="left"> </p>
48 <p align="left"><strong><font size="+1"><a name="General"></a>2. General Stuff</font></strong></p>
49 <p align="left"><strong>1. Comments</strong></p>
50 <p align="left">To add a comment to your file, simply put the # symbol right
51 before your comment. For example:<br>
52 <font size="2" face="Courier New, Courier, mono"># This is a comment</font></p>
53 <p align="left">It's a good idea to use comment markers to add a title header
54 at the top of your building file. The Triton Center file has this header:<br>
55 <font size="2" face="Courier New, Courier, mono">#The Triton Center<br>
56 #Copyright ©2003-2010 Ryan Thoryk</font></p>
58 <strong>2. Variables</strong></p>
59 <p align="left">Variables are marked with percent signs (%), and most system
60 variables will be described later. There are 256 user variables (0-255) which
61 can be set using the Set command:<font size="2" face="Courier New, Courier, mono"><br>
63 </font>and then can be used later:<font size="2" face="Courier New, Courier, mono"><br>
66 <p align="left"><strong>3. IF statements</strong></p>
67 <p align="left">Basic IF statements can be made, with the following syntax:<br>
68 <font size="2" face="Courier New, Courier, mono">if[<em>expression</em>] command</font></p>
69 <p align="left">Available signs are = (equals), > (greater than), < (less
70 than), ! (is not), & (and) and | (or). Expressions can also be enclosed
71 in parenthesis. Note that the IF statement only works with the current line,
72 and does not currently support multiple lines within an IF block, an "else"
73 statement, or nesting.</p>
74 <p align="left">For example, to set the height to 9.5 if the floor number is
76 <font size="2" face="Courier New, Courier, mono">if[%floor% < 82] Height
78 <p align="left">This example shows a complex expression:<br>
79 <font size="2" face="Courier New, Courier, mono">if[%floor% < 82 &
80 (%height% = 3 | %height% = 5)] Height = 9.5</font></p>
81 <p align="left">In the above example, the statement will be true if the <em>floor</em>
82 value is less than 82 and if the <em>height</em> value is either 3 or 5.<br>
84 <p align="left"><strong>4. Inline calculations</strong></p>
85 <p align="left">Values can be calculated inline by using the following math
87 + (plus), - (minus), / (divide), and * (multiply).</p>
88 <p align="left">They can be used anywhere in the data file. Here's an example
89 of one being used with the Set command:<br>
90 <font size="2" face="Courier New, Courier, mono">Set 1 = %floorheight% + 10</font></p>
91 <p align="left">Parenthesis are also supported, for grouped operations. Here's
92 an example of a complex math expression:<br>
93 <font size="2" face="Courier New, Courier, mono">Set 5 = %height% + (%interfloorheight%
94 * (4 / %altitude%))</font></p>
95 <p align="left"><font size="2" face="Courier New, Courier, mono"><br>
96 </font><strong>5. Object parameters from outside floor sections</strong></p>
97 <p align="left">Information about a certain floor can be obtained elsewhere
98 in the script, by referencing the floor in this manner:</p>
99 <p align="left"><font size="2" face="Courier New, Courier, mono">Floor(<em>number</em>).<em>parameter</em></font></p>
100 <p align="left">Available parameters are Altitude, Height, FullHeight and InterfloorHeight.
101 Note that this function must only be called after the specified floor has
103 <p align="left">Example:<font size="2" face="Courier New, Courier, mono"><br>
104 Set 1 = Floor(5).Altitude</font></p>
105 <p align="left"><strong><font size="2" face="Courier New, Courier, mono"><br>
106 </font>6. Includes</strong></p>
107 <p align="left">Other script files can be included (inserted) anywhere in the
108 current script by using the <Include> command.</p>
109 <p align="left">Syntax:<br>
110 <font size="2" face="Courier New, Courier, mono"><Include <em>filename</em>></font></p>
111 <p align="left">To include a file called test.txt that's in the data folder,
113 <font size="2" face="Courier New, Courier, mono"><br>
114 <Include data/test.txt><br>
116 <p align="left"><strong>7. Functions</strong></p>
117 <p align="left">Functions can be created to share code between sections of scripts,
118 and also between entire scripts when used in conjunction with includes. An
119 unlimited number of parameters can be specified for each function.</p>
120 <p align="left">Syntax:<br>
121 <font size="2" face="Courier New, Courier, mono"><Function <em>name</em>><br>
123 <EndFunction> </font></p>
124 <p align="left">The above is a function definition, and must be used outside
125 of any sections (such as <Floor>) and also before the function call.
126 To call the function later in your code, you use the function name followed
127 by a list of parameters contained within parenthesis, or just parenthesis
128 if you're not passing any parameters:</p>
129 <p align="left">Syntax:<br>
130 <em>name</em>(<em>parameter1</em>, <em>parameter2</em>, ...)<br>
134 The parameters appear as variables inside the function in the form of <font size="2" face="Courier New, Courier, mono">%param#%</font>
135 - so the first parameter passed is <font size="2" face="Courier New, Courier, mono">%param1%</font>,
136 the second is <font size="2" face="Courier New, Courier, mono">%param2%</font>,
137 etc. For an example, I'll create a function called Test with a single SetAutoSize
138 command within it, and call that function:</p>
141 <p><font size="2" face="Courier New, Courier, mono"><Function test><br>
142 SetAutoSize = %param1%, %param2%<br>
143 <EndFunction><br>
145 test(false, false)</font></p>
146 <p>In the above example, the command that ends up being performed is "SetAutoSize
147 = false, false".</p>
151 <strong>8. Global commands or functions that can be used anywhere in the script</strong></p>
152 <p align="left">In this section, <em>Destobject</em> refers to the destination
153 object to create other objects in. It can be either <em>floor </em>(only available
154 within a Floor section)<em>, external</em>, <em>landscape</em>, or <em>buildings</em>
155 (more will come soon). When the command is used inside a <em>Floor</em> section,
156 and <em>Destobject</em> is not <em>floor</em>, the altitude of the current
157 floor will be used, and altitude/y values specified in these commands will
158 be offsets of that altitude.</p>
160 <strong>a. AddTriangleWall</strong> - adds a textured triangular wall<br>
161 Syntax: <font size="2" face="Courier New, Courier, mono">AddTriangleWall <em>destobject,
162 name, texturename</em>, <em>x1</em>, <em>y1</em>, <em>z1</em>, <em>x2</em>,
163 <em>y2</em>, <em>z2</em>, <em>x3</em>, <em>y3</em>, <em>z3</em>, <em>tw</em>,
164 <em>th</em></font><br>
165 Example: <font size="2" face="Courier New, Courier, mono">AddTrianglewall
166 external, My Triangle, brick, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0</font></p>
167 <p align="left"><strong>b. AddWall</strong> - adds a textured wall<br>
168 Syntax: <font size="2" face="Courier New, Courier, mono">AddWall <em>destobject,
169 name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
170 z2, <em>height1</em>, <em>height2</em>, <em>altitude1</em>, <em>altitude2</em>,
171 <em>tw</em>, <em>th</em></font><br>
172 Example: <font size="2" face="Courier New, Courier, mono">AddWall buildings,
173 Wall1, brick, 0.5, -10, -10, 10, 10, 15, 15, Floor(2).Altitude, Floor(2).Altitude,
175 <p align="left">The command's parameters are the same as the Floor section's
177 <p align="left"><strong>c. AddFloor</strong> - adds a textured floor<br>
178 Syntax: <font size="2" face="Courier New, Courier, mono">AddFloor <em>destobject,
179 name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
180 <em>z2</em>, <em>altitude1</em>, <em>altitude2</em>, <em> tw</em>, <em>th</em></font></p>
181 <p align="left">The command's parameters are the same as the Floor section's
182 AddFloor command.</p>
183 <p align="left"><strong>d. AddGround</strong> - adds a tile-based ground<br>
184 Syntax: <font size="2" face="Courier New, Courier, mono">AddGround <em> name,
185 texturename</em>, <em>x1</em>, <em>z1</em>, <em>x2</em>, <em>z2</em>, <em>altitude</em>,
186 <em>tile_x</em>, <em>tile_y<br>
187 </em></font>Example: <font size="2" face="Courier New, Courier, mono">AddGround
188 AddGround Ground, Downtown, -158400, -158400, 158400, 158400, 0, 7920, 7920</font></p>
189 <p align="left">This command is mainly for creating large ground sections, since
190 using the AddFloor function with a large amount of texture tiling causes interference
191 problems. The X and Z values specify the total size of the ground, and the
192 tile_x and tile_y specify the size of each tile square to create. For example,
193 if the ground is 10,000 feet wide, and tile_x and tile_y are both 1000, then
194 100 total tiles will be created; 10 wide and 10 deep. In the example above
195 7920 is 1/40 of the total width (316800 which is 158400 * 2), so the tile
196 grid will be 40x40 tiles.</p>
197 <p align="left"><strong>e. CreateWallBox</strong> - creates 4 walls (box) at
198 the specified coordinate locations<br>
199 Syntax: <font size="2" face="Courier New, Courier, mono">CreateWallBox <em>destobject</em>,
200 <em>name, texturename</em>, <em>x1</em>, <em>x2</em>, <em>z1</em>, <em>z2</em>,
201 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th, inside, outside, top,
202 bottom </em></font><br>
203 Example: <font size="2" face="Courier New, Courier, mono">CreateWallBox external,
204 My Box, brick, -10, 10, -10, 10, 15, 0, 0, 0, true, true, true, true</font></p>
205 <p align="left">The parameters in this command are very similar to the ones
206 in the AddWall command shown below in the Floor section, except that a box
207 is created instead of a single wall. <em>Inside</em> and <em>outside</em>
208 determine if the wall should be visible from the inside/outside, and <em>top</em>
209 and <em>bottom</em> determine if the top and bottom walls should be drawn.</p>
210 <p align="left"><strong>f. CreateWallBox2</strong> - creates 4 walls (box) at
211 a specified central location<br>
212 Syntax: <font size="2" face="Courier New, Courier, mono">CreateWallBox2 <em>destobject</em>,
213 <em>name, texturename</em>, <em>centerx</em>, <em>centerz</em>, <em>widthx</em>,
214 <em>lengthz</em>, <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font><font size="2" face="Courier New, Courier, mono"><em>,
215 inside, outside, top, bottom </em></font><br>
216 Example: <font size="2" face="Courier New, Courier, mono">CreateWallBox2 external,
217 My Box, brick, 0, 0, 10, 10, 15, 0, 0, 0, false, true, false, false</font></p>
218 <p align="left">The parameters are the same as the above command, except that<em>
219 centerx</em> and <em>centerz</em> define the center of the box, and <em>widthx</em>
220 and <em>lengthz</em> specify the width and length off of the center.<br>
222 <strong>g. AddCustomWall</strong> - creates a custom polygon (wall, floor,
223 etc) with any number of vertex points. For example, a triangular wall has
224 3 vertex points, and a standard wall has 4. This function allows at least
226 Syntax: <font size="2" face="Courier New, Courier, mono">AddCustomWall <em>destobject,
227 name, texturename, x1, y1, z1, x2, y2, z2, x3, y3, z3, ..., tw, th</em></font><br>
228 Example: <font size="2" face="Courier New, Courier, mono">AddCustomWall external,
229 My Wall, brick, 0, 0, 0, 0, 10, 0, 10, 10, 0, 10, 0, 10, 0, 0</font></p>
230 <p align="left"><strong>h. AddShaft</strong> - creates a shaft at a specified
231 location and floor range<br>
232 Syntax: <font size="2" face="Courier New, Courier, mono">AddShaft number,
233 type, centerx, centerz, startfloor, endfloor</font><br>
234 Example: <font size="2" face="Courier New, Courier, mono">AddShaft 1, 2, 10,
236 <p align="left">The number parameter specifies the shaft number to create. <em>Type</em>
237 is either 1 for a pipe/utility shaft, 2 for an elevator shaft, and 3 for a
238 stairwell shaft. This command just tells the simulator the area that the shaft
239 will take up, and does not create the actual shaft walls. Later on when you
240 create the walls/floors for the shaft, make sure that you make a floor at
241 the very bottom and very top of the shaft (they can extend beyond the walls).</p>
242 <p align="left"><strong>i. CreateStairwell</strong> - creates a stairwell at
243 a specified location and floor range<br>
244 Syntax: <font size="2" face="Courier New, Courier, mono">CreateStairwell number,
245 centerx, centerz, startfloor, endfloor</font><br>
246 Example: <font size="2" face="Courier New, Courier, mono">CreateStairwell
247 1, 10, 10, 0, 9</font></p>
248 <p align="left">The number parameter specifies the stairwell number to create.
249 This command just tells the simulator the area that the stairwell will take
250 up, and does not create the actual walls.</p>
251 <p align="left"><strong>j. WallOrientation</strong> - changes the internal wall
252 orientation parameter, which is used for determining the wall thickness boundaries
253 in relation to their coordinates.<br>
254 Syntax:<font size="2" face="Courier New, Courier, mono"> WallOrientation =
255 <em>direction</em></font><br>
256 Example: <font size="2" face="Courier New, Courier, mono">WallOrientation
258 <p align="left">The direction parameter can either be left, center, or right.
259 Center is default. For example, if center is used, than half of the wall's
260 thickness is to the right (positive) of it's x1/x2 or z1/z2 coordinates, and
261 half is to the left (negative) of the coordinates. If left is used, than the
262 coordinates define the wall's left (negative) edge, and the full thickness
263 is to the right (positive) of those. If right is used, then again the coordinates
264 define the wall's right (positive) edge, and the full thickness is to the
265 left (negative) of those. See this graphic for a good example:</p>
266 <p align="left"><img src="guide/wall_info.jpg"></p>
267 <p align="left">In the graphic above, the large box at the top shows what the
268 X and Z coordinates correspond to. The lower examples show the wall orientation
269 as left or right, and if either the difference in x values or z values is
271 <p align="left"><strong>k. FloorOrientation</strong> - changes the internal
272 floor orientation parameter, which is used for determining the floor thickness
273 boundaries in relation to their coordinates.<br>
274 Syntax:<font size="2" face="Courier New, Courier, mono"> FloorOrientation
275 = <em>direction</em></font><br>
276 Example: <font size="2" face="Courier New, Courier, mono">FloorOrientation
278 <p align="left">The direction parameter can either be bottom, center, or top.
279 Top is default. For example, if center is used, than half of the floor's thickness
280 is above (positive) it's x1/x2 or z1/z2 coordinates, and half is below (negative)
281 the coordinates. If bottom is used, than the coordinates define the floor's
282 bottom edge, and the full thickness is the top (positive). If top is used,
283 then again the coordinates define the floor's top edge, and the full thickness
284 is the bottom (negative).</p>
285 <p align="left"><strong>l. DrawWalls</strong> - specifies which parts of a wall
286 or floor should be drawn.<br>
287 Syntax:<font size="2" face="Courier New, Courier, mono"> DrawWalls = <em>MainNegative,
288 MainPositive, SideNegative, SidePositive, Top, Bottom</em></font><br>
289 Example: <font size="2" face="Courier New, Courier, mono">DrawWalls = true,
290 true, false, false, false, false</font></p>
291 <p align="left">The example shown is the default setting. This can seem complex,
292 but I'll provide a graphic soon to explain it more easily. MainNegative is
293 the main (that makes up the length if a wall, or the main area if a floor)
294 face on the negative side, MainPositive is the main face on the positive side,
295 SideNegative is the side (the part that is along the thickness) face on the
296 negative side, SidePositive is the side face on the positive side; Top refers
297 to either the top side if a wall, or to the positive X face if a floor; Bottom
298 refers to either the bottom side if a wall, or the negative X face if a floor.
299 In the graphic above in the WallOrientation section, let's say that the large
300 box's difference in x values are larger (meaning that it is horizontal from
301 the left to the right), and that it has the same z values. With that, MainNegative
302 would be the front wall, MainPositive the back, SideNegative the left, SidePositive
304 <p align="left"><strong>m. SetPlanarMapping</strong> - sets the planar texture
305 mapper's parameters.<br>
306 Syntax:<font size="2" face="Courier New, Courier, mono"> SetPlanarMapping
307 Flat, X, Y, Z</font><br>
308 Example: <font size="2" face="Courier New, Courier, mono">SetPlanarMapping
309 false, false, false, true</font></p>
310 <p align="left">X, Y and Z reverse the texture mapping per axis, and Flat has
311 it ignore depth. Skyscraper by default uses a simple planar texture mapper,
312 which in simple terms draws the texture in a box around the object. With a
313 basic wall, the top-left of the texture image is mapped to the top left of
314 the wall, the top-right is mapped to the top-right of the wall, etc. If you
315 want the top-right of the texture mapped to the top-left of the wall for example
316 (to flip or change alignment), you'd set X to false. This command is mainly
317 used to change alignment - since the top-left of the texture is mapped to
318 the top-left of the object, that means that textures have a left/top alignment
319 by default. If you change X to true, it'll be right-aligned. If you change
320 Y to true, it'll be bottom-aligned. See this picture for an example:</p>
321 <p align="left"><img src="guide/extents.jpg"></p>
322 <p align="left">In the above picture, I tiled a texture (a black box with yellow
323 around it) 2.5 times on width and height. The bottom floor shows the default
324 texture mapping (ReverseExtents false, false, false); you'll notice that it's
325 aligned to the top-left. In the middle one, I set the X value to true (ReverseExtents
326 true, false, false). In the top one, I set the Y value to true (ReverseExtents
327 false, true, false).</p>
328 <p align="left"><strong>m. SetTextureMapping</strong> - manually sets UV texture
329 mapping for all polygons generated after this command; ResetTextureMapping
330 restores the values to the defaults or previous<br>
331 Syntax:<font size="2" face="Courier New, Courier, mono"> SetTextureMapping
332 vertex1, u1, v1, vertex2, u2, v2, vertex3, u3, v3</font><br>
333 Example: <font size="2" face="Courier New, Courier, mono">SetTextureMapping
334 0, 0, 0, 1, 1, 0, 2, 1, 1</font></p>
335 <p align="left">The example shown above is the default value used by the simulator.
336 This command maps the texture coordinates to the specified 3 vertex indices
337 - normally a side of a wall will have 4 vertices/sets of coordinates (0 to
338 3), and by default the first three are used (top left, top right and bottom
339 right respectively), with the UV coordinates representing the size percentage
340 of the texture (with 1 being 100%, 0.5 being 50%, etc; normally this would
341 relate to absolute texture coordinates) - so in the example, texture coordinate
342 0,0 (top left) is mapped at the first vertex (top left); texture coordinate
343 1,0 (really "width, 0") being mapped at the second vertex (top right),
344 and texture coordinate 1,1 (really "width, height") being mapped
345 to the bottom right. For a standard wall, the valid vertex values are from
346 0 to 3. If a wall or floor is created with AddCustomWall, and if it has for
347 example 7 vertex points, the valid values for this command would then be 0
348 to 6 (but only 3 vertices can be used for mapping purposes). Textures can
349 also be cropped with this command - for example, to map only a central square
350 of a texture, you'd use:<br>
351 <font size="2" face="Courier New, Courier, mono">SetTextureMapping 0, 0.25,
352 0.25, 1, 0.75, 0.25, 2, 0.75, 0.75</font></p>
353 <p align="left">Here's an easier way to see the example above:</p>
354 <p align="left"><font size="2" face="Courier New, Courier, mono">0 -> 0,
357 2 -> 1, 1</font></p>
358 <p align="left">The following diagram shows the mapping described above. Texture
359 location 0,0 is mapped to wall vertex 0, location 1,0 is mapped to vertex
361 <p align="left"><img src="guide/texture_mapping.jpg" width="300" height="300"></p>
362 <p align="left"><strong>n. SetTextureMapping2</strong> - advanced version of
363 SetTextureMapping - manually sets UV texture mapping for all polygons generated
364 after this command; ResetTextureMapping restores the values to the defaults
366 Syntax:<font size="2" face="Courier New, Courier, mono"> SetTextureMapping2
367 v1x, v1y, v1z, u1, v1, v2x, v2y, v2z, u2, v2, v3x, v3y, v3z, u3, v3</font><br>
368 Example: <font size="2" face="Courier New, Courier, mono">SetTextureMapping2
369 x0, y0, z0, 0, 0, x1, y1, z1, 1, 0, x2, y2, z2, 1, 1</font></p>
370 <p align="left">See the above description of SetTextureMapping for a detailed
371 description on texture mapping in general. This command mostly does the same
372 as that command, and the example given is the default command (and is equivalent
373 to the SetTextureMapping example). Instead of just choosing which vertex indices
374 to use like SetTextureMapping, this command lets you create your own texture
375 vertices (sets of coordinates) using coordinates of already-existing vertices.
376 The vertex values that can be used start with an "x", "y"
377 or "z", followed by the vertex index. In the example, the X, Y and
378 Z values of the first vertex are mapped to UV coordinate 0,0 - this is because
379 "x0, y0, z0" was specified. A specification of "x0, y2, z0"
380 will use the X and Z values from vertex 0, but the Y value from vertex 2.
381 This way you can specify coordinates outside of the wall/polygon's range.
382 Here's an easier way to see the example:</p>
383 <p align="left"><font size="2" face="Courier New, Courier, mono">x0, y0, z0
385 x1, y1, z1 -> 1, 0<br>
386 x2, y2, z2 -> 1, 1</font></p>
387 <p align="left"><strong>o. ResetTextureMapping</strong> - resets the texture
388 mapping parameters to either the default or previous values<br>
389 Syntax:<font size="2" face="Courier New, Courier, mono"> ResetTextureMapping
391 Example: <font size="2" face="Courier New, Courier, mono">ResetTextureMapping
393 <p align="left">If <em>default</em> is true, the texture mapping values are
394 reset to the default, which is shown above in the SetTextureMapping's example.
395 If <em>default</em> is false, the previous values will be loaded and used.</p>
396 <p align="left"><strong>p. ReverseAxis</strong> - reverses the axis that the
397 difference in altitude/voffset for floors corresponds to. In the AddFloor
398 command, there are parameters for specifying two different altitudes. By default,
399 if the altitudes are different, the floor will angle upward/downward along
400 the Z axis (front/back), but if this is set to true, the floor will angle
401 along the X axis (left/right).<br>
402 Syntax:<font size="2" face="Courier New, Courier, mono"> ReverseAxis = value</font></p>
403 <p align="left"> <strong>q. ShaftCut</strong> - used in conjunction with a shaft
404 object - performs a vertical box cut on all floor objects (floors, ceilings,
405 interfloor, etc) in the specified range.<br>
406 Syntax:<font size="2" face="Courier New, Courier, mono"> ShaftCut number,
407 startx, startz, endx, endz, start_voffset, end_voffset</font><br>
408 Example: <font size="2" face="Courier New, Courier, mono">ShaftCut 1, -4,
409 -3.5, 4, 3.5, 0, 5</font></p>
410 <p align="left"><em>Number</em> is the number of the shaft object to work with.
411 <em>Startx</em>, <em>startz</em>, <em>endx</em>, and <em>endz</em> are two
412 sets of coordinates that specify the cut box's start position and end position,
413 relative to the shaft's central position. <em>Start_voffset</em> is the position
414 above the starting floor's altitude to start the cut at, and <em>end_voffset</em>
415 is the position above the ending floor's altitude to end the cut at. The example
416 cuts a box for shaft 1, with a width from -4 to 4, and a length from -3.5
417 to 3.5, starting at the starting floor's altitude, and ending at 5 feet above
418 the ending floor's altitude.</p>
419 <p align="left"><strong>r. CutStairwell</strong> - used in conjunction with
420 a stairwell object - performs a vertical box cut on all floor objects (floors,
421 ceilings, interfloor, etc) in the specified range. For the parameters, see
422 the ShaftCut command.<strong><br>
423 </strong>Syntax: <font size="2" face="Courier New, Courier, mono">CutStairwell
424 number, startx, startz, endx, endz, start_voffset, end_voffset</font><br>
425 Example: <font size="2" face="Courier New, Courier, mono">CutStairwell 1,
426 -4, -3.5, 4, 3.5, 0, 5</font></p>
427 <p align="left"><strong>s. Isect</strong> - the Isect function calculates the
428 position that a line intersects with a certain object, such as a floor. Since
429 this is a function, it can be used in-line anywhere.<br>
430 Syntax:<font size="2" face="Courier New, Courier, mono"> isect(destobject,
431 objectname, startx, starty, startz, endx, endy, endz)</font><br>
432 Example: <font size="2" face="Courier New, Courier, mono">isect(external,
433 wall1, 10, 10, 0, -10, 10, 0)</font></p>
434 <p align="left"><em>Destobject</em> is the destination object to get the object
435 from (floor, external, landscape, or buildings). <em>Startx</em>, <em>starty</em>,
436 and <em>startz</em> make up the position of the starting position, and <em>endx</em>,
437 <em>endy</em> and <em>endz</em> make up the ending position. The first intersection
438 of the named object is the return value, in "X, Y, Z" format (for
439 example, "10, 1, 3").</p>
440 <p align="left"><strong>t. SetAutoSize</strong> - enables or disables texture
442 Syntax:<font size="2" face="Courier New, Courier, mono"> SetAutoSize = <em>AutoWidth,
443 AutoHeight </em></font><br>
444 Example: <font size="2" face="Courier New, Courier, mono">SetAutoSize = true,
446 <p align="left">This command will determine if the simulator should automatically
447 size texture appropriately when applied to an object, such as a wall or floor.
448 By default, both are enabled. The <em>AutoWidth</em> and <em>AutoHeight</em>
449 parameters correspond to the "<em>tw</em>" and "<em>th</em>"
450 parameters of the <em>AddWall</em>, <em>AddFloor</em>, etc commands. If any
451 are false, then the parameters specified in the <em>AddWall</em> etc commands
452 multiply the texture values stored with with the <em>Load</em> or <em>LoadRange</em>
453 commands (see below); those values relate to the number of times a texture
454 is tiled; so if <em>AutoHeight</em> is set to False, "2" is specified
455 in the "<em>th</em>" value of <em>AddWall</em>, and the texture's
456 stored "th" value is 1, then the texture will be tiled twice vertically.
457 If either are true, the specified value will me multiplied by the related
458 stored texture value and then autoadjusted.</p>
459 <p align="left"><strong>u. TextureOverride</strong> - overrides textures for
460 the next command. Currently only works with the different AddWall, AddFloor
461 and AddInterFloor commands.<br>
462 Syntax:<font size="2" face="Courier New, Courier, mono"> TextureOverride <em>MainNegativeTex,
463 MainPositiveTex, SideNegativeTex, SidePositiveTex, TopTex, Bottom</em></font><font size="2" face="Courier New, Courier, mono"><em>Tex</em></font><br>
464 Example: <font size="2" face="Courier New, Courier, mono">TextureOverride
465 Metal1, ElevFloor, Metal1, Metal1, Metal1, Metal1</font></p>
466 <p align="left">This command will allow you to specify multiple textures for
467 a single command such as AddWall. It will only work on the command immediately
468 after this one. In the above example, the Main Positive side of the object
469 will have the texture "ElevFloor", but all other sides will use
470 "Metal1".</p>
471 <p align="left"><strong>v. ShaftShowFloors</strong> - allows a range of floors
472 to be shown either while inside the specified shaft or while inside an elevator
473 in the shaft - primarily for glass elevators.<br>
474 Syntax:<font size="2" face="Courier New, Courier, mono"> ShaftShowFloors <em>ShaftNumber</em>
475 = <em>range/list</em></font><br>
476 Example: <font size="2" face="Courier New, Courier, mono">ShaftShowFloors
477 1 = 1 - 10</font></p>
478 <p align="left">In the above example, let's say the user is in an elevator in
479 shaft 1, and is moving upwards from the 2nd floor. In this situation, the
480 2nd floor will be visible/enabled while they're in the elevator (since it
481 was in the range specified with this command), but when they reach the 11th
482 floor, that floor will be invisible/disabled.</p>
483 <p align="left"><strong>w. ShaftShowOutside</strong> - allows objects outside
484 the building (sky, landscape, etc) to be enabled while the user is both inside
485 the specified shaft and on one of the specified floors - primarily for glass
487 Syntax:<font size="2" face="Courier New, Courier, mono"> ShowShaftOutside
488 <em>ShaftNumber</em> = <em>range/list</em></font><br>
489 Example: <font size="2" face="Courier New, Courier, mono">ShowShaftOutside
490 1 = 1 - 10</font></p>
491 <p align="left">In the above example, if a user is riding an elevator in shaft
492 1, the outside (sky, landscape, etc) will be enabled while the elevator is
493 on any of the floors from 1 to 10. Once the elevator reaches the 11th floor,
494 the outside will be disabled. This command can be mixed with <em>ShaftShowFloors</em>
495 for mixed atrium/external glass elevators such as the ones in the Glass Tower,
496 where the elevator moves upwards through an indoor atrium, and eventually
497 outside above the atrium. In that situation, the floors that comprise the
498 lower (atrium) section would be specified using <em>ShaftShowFloors</em> (such
499 as 1-10), while the upper (outdoor) floors would be specified using <em>ShaftShowOutside</em>
501 <p align="left"><strong>x. ShowFullShaft</strong> - determines if an entire
502 shaft should always be shown, such as a glass elevator track.<br>
503 Syntax:<font size="2" face="Courier New, Courier, mono"> ShowFullShaft <em>ShaftNumber</em>
504 = <em>value</em></font><br>
505 Example: <font size="2" face="Courier New, Courier, mono">ShowFullShaft 1
507 <p align="left"><strong>y. TextureFlip</strong> - flips specified textures for
508 the next command.. Currently only works with the different AddWall, AddFloor
509 and AddInterFloor commands. The values available are 0 for no flipping, 1
510 for horizontal flip, 2 for vertical flip, and 3 for both horizontal and vertical.<br>
511 Syntax:<font size="2" face="Courier New, Courier, mono"> TextureFlip <em>MainNegative,
512 MainPositive, SideNegative, SidePositive, Top, Bottom</em></font><br>
513 Example: <font size="2" face="Courier New, Courier, mono">TextureFlip 1, 1,
514 0, 0, 0, 0</font></p>
515 <p align="left">This command will allow you to flip textures on specific parts
516 of a wall or floor created with a command such as AddWall. It will only work
517 on the command immediately after this one. In the above example, the Main
518 Positive and Main Negative sides of the object will have their textures flipped
520 <p align="left"><strong>z. Cut</strong> - performs a manual box cut on an object<br>
521 Syntax: <font size="2" face="Courier New, Courier, mono">Cut <em>destobject</em>,
522 x1, y1, z1, x2, y2, z2, cutwalls, cutfloors<br>
523 </font>Example: <font size="2" face="Courier New, Courier, mono">Cut external,
524 -5, -5, -5, 5, 5, 5, false, true</font></p>
525 <p align="left">The x, y and z values specify the start and end coordinates
526 of the box cut. If cutwalls is true, the function will cut walls; if cutfloors
527 is true, it'll cut floors.</p>
528 <p align="left"><strong>aa. Mount</strong> - mounts a zip file in the data directory
529 into a virtual path.<br>
530 Syntax: <font size="2" face="Courier New, Courier, mono">Mount <em>filename</em>,
531 <em>path</em></font><br>
532 Example: <font size="2" face="Courier New, Courier, mono">Mount myfile.zip,
533 mydirectory</font></p>
534 <p align="left">In this example, the file myfile.zip located in Skyscraper's
535 data directory will be mounted as "mydirectory", and so a file such
536 as test.jpg inside that zip file will appear as "mydirectory/test.jpg".</p>
537 <p align="left"><strong>ab. AddFloorAutoArea</strong> - defines an area that
538 will automatically enable and disable floors when the user moves within it,
539 similar to a stairwell<br>
540 Syntax: <font size="2" face="Courier New, Courier, mono">AddFloorAutoArea
541 <em>x1, y1, z1, x2, y2, z2</em></font><br>
542 Example: <font size="2" face="Courier New, Courier, mono">AddFloorAutoArea
543 -100, 0, -100, 100, 100, 100</font></p>
544 <p align="left"><strong>ac. AddSound</strong> - creates a user-defined looping
545 sound at the specified position<br>
546 Syntax: <font size="2" face="Courier New, Courier, mono">AddSound <em>name,
547 filename, x, y, z[, volume, speed, min_distance, max_distance, dir_radiation,
548 direction_x, direction_y, direction_z]</em></font><br>
549 Example 1: <font size="2" face="Courier New, Courier, mono">AddSound MySound,
550 sound.wav, 10, 100, 5<br>
551 </font>Example 2: <font size="2" face="Courier New, Courier, mono">AddSound
552 MySound, ambient.ogg, 10, 100, 5, 1, 100, 1, -1, 0, 0, 0, 0</font></p>
553 <p align="left">This command creates a custom sound in the specified position,
554 and has a number of optional parameters - the defaults for the optional parameters
555 are shown in Example 2. If you're going to use any of the optional parameters,
556 you must specify them all. <em>X</em>, <em>Y</em> and <em>Z</em> specify the
557 location in 3D space that the sound will be at, <em>volume</em> specifies
558 the volume percentage (with 1.0 being 100%) of the sound, <em>speed</em> determines
559 the playback speed of the sound in percent, <em>min_distance</em> and <em>max_distance</em>
560 set the minimum and maximum distances that the sound can be heard at full
561 volume - by default, minimum is 1 and maximum is -1. <em>Dir_radiation</em>
562 specifies the directional radiation of the sound in radians (more info below),
563 and <em>direction_x</em>, <em>direction_y</em> and <em>direction_z</em> specify
564 the direction of the sound cone.</p>
565 <p align="left"> From the Crystal Space docs on directional radiation:<br>
566 "The directional radiation applies to sound that are oriented in a particular
567 direction. This value is expressed in radians and describes the half-angle
568 of a cone spreading from the position of the source and opening in the direction
569 of the source. Set this value to 0.0 for an omni-directional sound."</p>
570 <p align="left"><strong>ad. GetWallExtents</strong> - the GetWallExtents command
571 returns the X and Z extents (minimum and maximum values) of a wall, at the
572 specified altitude. The command will return the results in the MinX, MinZ,
573 MaxX and MaxZ variables.<br>
574 Syntax:<font size="2" face="Courier New, Courier, mono"> GetWallExtents destobject,
575 wallname, altitude</font><br>
576 Example: <font size="2" face="Courier New, Courier, mono">GetWallExtents external,
577 wall1:front, 10</font></p>
578 <p align="left">Then to use the values:<br>
579 Example: <font size="2" face="Courier New, Courier, mono">Set 2 = %minz%</font></p>
580 <p align="left"><em>Destobject</em> is the destination object to get the object
581 from (floor, external, landscape, or buildings). <em>Wallname </em>specifies
582 the name of the wall to get the extents from. Generally this should be in
583 the form of "name:side", but if you leave out the "side"
584 parameter, it'll choose one of the sides from a pre-defined search list. Sides
585 of walls made from any AddWall command generally have "front", "back",
586 "left" and "right" sides. Walls made using AddCustomWall
587 and AddTriangleWall have sides of "0" (front) and "1"
588 (back), so with those you'd specify "name:0" for the front. <em>Altitude</em>
589 specifies the altitude to use for the check - basically it makes a copy of
590 the wall, cuts it down to a line at that altitude, and returns the coordinates
591 of the endpoints. The command will store the results in the MinX, MinZ, MaxX
592 and MaxZ variables, which can be used anywhere in the script - to get the
593 minimum X result, you'd use %minx%.</p>
594 <p align="left"><strong>ae. Print</strong> - prints the contents of a line to
595 the console. This command will still convert variables and even math expressions,
596 and output the results.<br>
597 Syntax:<font size="2" face="Courier New, Courier, mono"> Print text</font><br>
598 Example: <font size="2" face="Courier New, Courier, mono">Print 1+1</font></p>
599 <p align="left"> </p>
600 <p align="left"><strong>8. END command</strong></p>
601 <p align="left">The End command tells the software to stop processing the current
602 script and start the simulation. This is optional.<br>
603 Example: <font size="2" face="Courier New, Courier, mono"><end></font></p>
605 <strong>10. BREAK command</strong></p>
606 <p align="left">The Break command triggers a break section in the script processor,
607 and is used when running the simulator in debug mode. A debugger breakpoint
608 can be set on the associated line in fileio.cpp, and when this command is
609 called, the debugger will hit the breakpoint.<br>
610 Example: <font size="2" face="Courier New, Courier, mono"><break></font></p>
611 <p align="left"> </p>
612 <p align="left"> <strong><font size="+1"><a name="Globals"></a>3. The <em>Globals</em>
613 Section</font></strong></p>
614 <p align="left">The <em>Globals</em> section contains the general information
615 about your building. The section starts with this header:<br>
616 <font size="2" face="Courier New, Courier, mono"><Globals></font></p>
617 <p align="left">and ends with this footer:<br>
618 <font size="2" face="Courier New, Courier, mono"><EndGlobals></font></p>
619 <p align="left">Parameters are placed between those two markers, and look like
621 <font size="2" face="Courier New, Courier, mono">Parameter = <em>value</em></font></p>
622 <p align="left">Example:<br>
623 <font size="2" face="Courier New, Courier, mono">Name = Triton Center</font></p>
624 <p align="left"><strong>Parameters (all are optional):</strong></p>
625 <p align="left"><strong>1. Name</strong> - building name<br>
626 Example: <font size="2" face="Courier New, Courier, mono">Name = My Building</font></p>
627 <p align="left"> <strong>2. Designer</strong> - name of building's designer<br>
628 <font size="2" face="Courier New, Courier, mono">Designer = Me</font><br>
630 <strong>3. Location</strong> - location of the building<br>
631 <font size="2" face="Courier New, Courier, mono">Location = 100 Main Street</font></p>
632 <p align="left"> <strong>4. Description</strong> - Brief description of the
634 <font size="2" face="Courier New, Courier, mono">Description = A really average
637 <strong>5. Version</strong> - Version of the building (can be text)<br>
638 <font size="2" face="Courier New, Courier, mono">Version = 1</font><br>
640 <strong>6. CameraFloor</strong> - camera's starting floor, starting with 0
641 (like Floors command) - default is 0<br>
642 <font size="2" face="Courier New, Courier, mono">CameraFloor = 0</font><br>
644 <strong>7. CameraPosition</strong> - camera's starting position in X (left/right)
645 and Z (forward/backward) feet coordinates - default is "0, 0"<br>
646 Syntax: <font size="2" face="Courier New, Courier, mono">CameraPosition =
647 <em>X</em>, <em>Z</em></font><br>
648 <font size="2" face="Courier New, Courier, mono">CameraPosition = 0, -10</font><br>
650 <strong>8. CameraDirection</strong> - specifies a 3D point that the camera is looking at on startup (instead of specifying rotation),
651 in X (left/right), Y (up down), and Z (forward/backward) feet coordinates.<br>
652 <font size="2" face="Courier New, Courier, mono">CameraDirection = 0, 10,
654 <p align="left"><strong>9. CameraRotation</strong> - axis rotation of the camera
655 on startup - X is degrees up/down, Y is degrees left/right, and Z is spin. Default is "0, 0, 0", and
656 the example makes the camera face right.<br>
657 Syntax: <font size="2" face="Courier New, Courier, mono">CameraRotation =
658 <em>X</em>, <em>Y</em>, <em>Z</em></font><br>
659 <font size="2" face="Courier New, Courier, mono">CameraRotation = 0, 90, 0</font></p>
660 <p align="left"><strong>10. Sky</strong> - which skybox texture pack to use.
661 In the following example, the chosen pack is "noon", and the file
662 "sky-noon.zip" will be loaded. Default is "noon".<br>
663 <font size="2" face="Courier New, Courier, mono">Sky = noon</font></p>
664 <p align="left"> </p>
665 <p align="left"><strong> <font size="+1"><a name="Textures"></a>4. The <em>Textures</em>
666 Section</font></strong></p>
667 <p align="left">The Textures section loads textures into the simulation and
668 assigns names to them, for use in the rest of the sections. The section starts
669 with this header:<br>
670 <font size="2" face="Courier New, Courier, mono"><Textures></font></p>
671 <p align="left">and ends with this footer:<br>
672 <font size="2" face="Courier New, Courier, mono"><EndTextures></font></p>
673 <p align="left"><strong>1. Load</strong> - loads a texture<br>
674 Syntax: <font size="2" face="Courier New, Courier, mono">Load <em>filename</em>,
675 <em>name</em>, <em>tile_x</em>, <em>tile_y[, force</em></font>]<br>
676 Example: <font size="2" face="Courier New, Courier, mono">Load data\brick1.jpg,
677 Brick, 1, 1</font></p>
678 <p align="left">This example will load the file brick.jpg and name it Brick.
679 The values <em>tile_x</em> and <em>tile_y</em> are per-texture multipliers.
680 For example, if you set <em>tile_x</em> to 2, and you specify a texture width
681 (tw) of 2 during an <em>AddFloor</em> command later, the tiling value will
682 be 4 (2 times 2), and the texture will be repeated 4 times horizontally. The
683 <em>force</em> value is optional, and if set to false, autosizing will always
684 be disabled for this texture; if set to true, autosizing will always be enabled.</p>
685 <p align="left"><strong>2. LoadRange</strong> - loads a numeric range of textures,
686 and the current number is available in the <em>number</em> variable (<font size="2" face="Courier New, Courier, mono">%number%</font>)<br>
687 Syntax: <font size="2" face="Courier New, Courier, mono">LoadRange <em>startnumber</em>,
688 <em>endnumber</em>, <em>filename</em>, <em>name</em>, <em>tile_x</em>, <em>tile_y[,
689 force] </em></font><br>
690 Example: <font size="2" face="Courier New, Courier, mono">LoadRange 2, 138,
691 data\floorindicators\%number%.jpg, Button%number%, 1, 1</font></p>
692 <p align="left">This example will load the file 2.jpg and name it Button2, 3.jpg
693 as Button3, and so on. The values <em>tile_x</em> and <em>tile_y</em> are
694 per-texture multipliers. For example, if you set <em>tile_x</em> to 2, and
695 you specify a texture width (tw) of 2 during an <em>AddFloor</em> command
696 later, the tiling value will be 4 (2 times 2), and the texture will be repeated
697 4 times horizontally. The <em>force</em> value is optional, and if set to
698 false, autosizing will always be disabled for this texture; if set to true,
699 autosizing will always be enabled.</p>
700 <p align="left"><strong>3. AddText</strong> - draws text onto a texture - this
701 only creates a new texture during runtime (in memory), and all changes are
702 lost when the application shuts down<br>
703 Syntax: <font size="2" face="Courier New, Courier, mono">AddText texture_name,
704 name, font_filename, font_size, text, x1, y1, x2, y2, h_align, v_align, ColorR,
705 ColorG, ColorB[, force</font>]<br>
706 Example: <font size="2" face="Courier New, Courier, mono">AddText Black, Button100,
707 nimbus_sans.ttf, 47, 100, -1, -1, -1, -1, center, center, 255, 255, 255</font></p>
708 <p align="left">With this command, texture_name is the name of the previously
709 loaded texture to draw text onto (loaded with either Load or LoadRange). Name
710 is the name to call this new texture. Font_filename is the filename of the
711 font to use - fonts are in Skyscraper's data/fonts directory. X1, y1, x2,
712 and y2 are coordinate values mainly used to position the text in a boxed area,
713 with the position of 0, 0 (x 0, y 0) being on the top left.. If any value
714 is -1, the dimension of the texture will be used (so in this example, the
715 loaded texture has a size of 128x128 pixels, and so the values are 0, 0, 128,
716 128). This will place the text in the center of the texture image, but to
717 position it elsewhere, specify the pixel box to place it in. H_align and v_align
718 determine the alignment of the text - for h_align, it can either be "left",
719 "right" or "center", and for v_align either "top",
720 "bottom" or "center". ColorR, ColorG and ColorB determine
721 the color of the text, and the values range from 0 to 255. If all values are
722 255, the text is white, and if all values are 0, then it's black. The <em>force</em>
723 value is optional, and if set to false, autosizing will always be disabled
724 for this texture; if set to true, autosizing will always be enabled. Note
725 that the source texture needs to be a power-of-two size, such as 128x128,
726 256x256, 512x512, etc - this is because the work is done directly on the graphics
727 card, and the majority of cards only support those kinds of sizes. Normal
728 textures loaded with the Load command are internally resized by Crystal Space
729 before use, and don't have that limitation.</p>
730 <p align="left"><strong>4. AddTextRange</strong> - similar to LoadRange, but
731 draws text onto a texture<br>
732 Syntax: <font size="2" face="Courier New, Courier, mono">AddText startnumber,
733 endnumber, texture_name, name, font_filename, font_size, text, x1, y1, x2,
734 y2, h_align, v_align, ColorR, ColorG, ColorB[, force</font>]<br>
735 Example: <font size="2" face="Courier New, Courier, mono">AddText 1, 100,
736 Black, Button%number%, nimbus_sans.ttf, 47, %number%, -1, -1, -1, -1, center,
737 center, 255, 255, 255</font></p>
738 <p align="left"><strong>5. LoadCropped</strong> - loads a cropped image.<br>
739 Syntax: <font size="2" face="Courier New, Courier, mono">LoadCropped filename,
740 name, x, y, width, height, tile_x, tile_y[, force</font>]<br>
741 Example: <font size="2" face="Courier New, Courier, mono">LoadCropped data\brick1.jpg,
742 Brick2, 10, 10, 20, 20, 1, 1</font></p>
743 <p align="left">This command is similar to the Load command, but loads only
744 a portion of an image. In the above example, the command loads the file data\brick1.jpg
745 as "Brick2", but only loads the portion of the image starting at
746 pixel 10, 10, with a width of 20 pixels and a heigth of 20 pixels. Pixel 0,
747 0 is on the top left of the image. The <em>force</em> value is optional, and
748 if set to false, autosizing will always be disabled for this texture; if set
749 to true, autosizing will always be enabled.</p>
750 <p align="left"><strong>6. AddOverlay</strong> - draws an image on top of another
752 Syntax: <font size="2" face="Courier New, Courier, mono">AddOverlay texture_name,
753 overlay_texture_name, name, x, y, width, height, tile_x, tile_y[, force]</font><br>
754 Example: <font size="2" face="Courier New, Courier, mono">AddOverlay Brick1,
755 Brick2, NewBrick, 25, 25, 50, 50, 1, 1</font></p>
756 <p align="left">This command allows multiple textures to be combined into a
757 single texture, by drawing one on top of the other. <em>Texture_name</em>
758 specifies the original source texture name to use (all textures must be loaded
759 beforehand), <em>overlay_texture_name</em> specifies the texture to draw on
760 top of the source texture, and <em>name</em> specifies the name of the new
761 texture. X and Y determine the position to place the top-left of the new image
762 at (since position 0, 0 is the top left of the image), and width and height
763 determine the size in pixels of the overlay texture. In the above example,
764 the "Brick2" texture is drawn on top of the "Brick1" texture,
765 starting at pixel position 25, 25, with a width of 50 and a height of 50.
766 The resulting texture is called "NewBrick". The <em>force</em> value
767 is optional, and if set to false, autosizing will always be disabled for this
768 texture; if set to true, autosizing will always be enabled.</p>
770 <p align="left"><strong><font size="+1"><a name="Floor"></a>5. The <em>Floor</em>
771 Sections</font></strong></p>
772 <p align="left">There are 2 <em>Floor</em> sections available - <em>Floor</em>
773 and <em>Floors</em>. <em>Floor</em> specifies a single floor, while <em>Floors</em>
774 specifies a range of floors.<br>
775 For a single floor, the section would start with this:<br>
776 <font size="2" face="Courier New, Courier, mono"><Floor <em>number</em>></font><br>
777 and end with this:<br>
778 <font size="2" face="Courier New, Courier, mono"><EndFloor></font><br>
779 For example, a floor section for a lobby would use this:<br>
780 <font size="2" face="Courier New, Courier, mono"><Floor 0></font></p>
781 <p align="left">For multiple floors, the section would start with this:<br>
782 <font size="2" face="Courier New, Courier, mono"><Floors <em>start</em>
783 to <em>finish</em>></font><br>
784 and end with this:<br>
785 <font size="2" face="Courier New, Courier, mono"><EndFloors><br>
786 </font>For example, to work with floors 5-10, you would type:<font size="2" face="Courier New, Courier, mono"><br>
787 <Floors 5 to 10></font></p>
788 <p align="left">Floors above ground start with 0 (so a 15-story building would
789 have floors 0-14). Also, floors must be made in the proper order: basement
790 levels must be made first in decending order (-1, -2, -3 etc), and then above-ground
791 floors in ascending order (0, 1, 2, etc).</p>
792 <p align="left"><strong>Variables:</strong></p>
793 <p align="left"><font size="2" face="Courier New, Courier, mono"><strong>%floor%</strong></font>
794 - contains the current floor number<br>
795 <font size="2" face="Courier New, Courier, mono"><strong>%height%</strong></font>
796 - contains the current floor's ceiling height<br>
797 <font size="2" face="Courier New, Courier, mono"><strong>%interfloorheight%</strong></font>
798 - contains the current floor's interfloor height (spacing between floors)<br>
799 <font size="2" face="Courier New, Courier, mono"><strong>%fullheight%</strong></font>
800 - contains the current floor's total height, including the interfloor height<br>
802 <p align="left"><strong>Parameters:</strong></p>
803 <p align="left"><strong>1. Name</strong> - the name of the current floor, required<br>
804 Example: <font size="2" face="Courier New, Courier, mono">Name = Floor %floor%</font></p>
805 <p align="left"><strong>2. ID</strong> - the floor indicator name for the current
806 floor, such as L (for Lobby), LL (lower level), M (Mezzanine), etc. This is
807 also used to determine what texture should be loaded for the elevator floor
808 indicators and floor signs. The texture name would be "Button[ID]"
809 - so if the ID is 10, the texture name would be "Button10".<br>
810 <font size="2" face="Courier New, Courier, mono">ID = %floor%</font></p>
811 <p align="left"><strong>3. Type</strong> - the type of floor the current floor
812 is. The types are still being defined, but the currently used ones are Basement,
813 Lobby, Mezzanine, Conference, Office, Service, Skylobby, Hotel, Apartment,
814 Condominium, Restaurant, Observatory, Recreation, Ballroom, Communications,
815 and Roof. (Required)<br>
816 <font size="2" face="Courier New, Courier, mono">Type = Office</font></p>
817 <p align="left"><strong>4. Description</strong> - description of the current
819 <font size="2" face="Courier New, Courier, mono">Description = Offices</font></p>
820 <p align="left"><strong>5. Height</strong> - the floor-to-ceiling height of
821 the current floor, required<br>
822 <font size="2" face="Courier New, Courier, mono">Height = 9.5</font></p>
823 <p align="left"><strong>6. InterfloorHeight</strong> - the height in feet of
824 the space between floors (below each floor), starting at the floor's altitude,
825 and ending right below the level's floor; required.<br>
826 <font size="2" face="Courier New, Courier, mono">InterfloorHeight = 2.24</font></p>
827 <p align="left"><strong>7. Altitude</strong> - this parameter is optional and
828 is only recommended if the first level has an interfloor area that needs to
829 be below ground. If this parameter is not used, the altitude will be calculated
831 <font size="2" face="Courier New, Courier, mono">Altitude = -2.24</font></p>
832 <p align="left"><strong>8. Group</strong> - group floors together. This is a
833 list of comma-separated floor numbers (or a range specified with the - symbol)
834 that should be enabled along with this floor when the user arrives at this
835 floor. For example, if a 2-story room has a balcony, and the room base and
836 balcony are separate floors, you would specify the other floor's number in
839 <font size="2" face="Courier New, Courier, mono">Group = 5</font><br>
840 <font size="2" face="Courier New, Courier, mono">Group = 4, 5<br>
841 Group = 4 - 10</font></p>
843 <strong>Commands:</strong></p>
844 <p align="left"><strong>1. Exit</strong> - exits the current floor section</p>
845 <p align="left"><strong>2. AddFloor</strong> - adds a textured floor with the
846 specified dimensions to the current floor/level<br>
847 Syntax: <font size="2" face="Courier New, Courier, mono">AddFloor <em>name,
848 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>, <em>z2</em>,
849 <em>voffset1</em>, <em>voffset2, tw</em>, <em>th, isexternal</em></font><br>
850 Example: <font size="2" face="Courier New, Courier, mono">AddFloor My Floor,
851 brick, 0.5, -10, -10, 10, 10, 0, 0, 0, 0, False</font></p>
852 <p align="left"><em>Voffset1</em> and <em>voffset2</em> are the height in feet
853 above the current floor's altitude; <em>tw</em> and <em>th</em> are to size/tile
854 the texture (0 lets the app autosize them), and <em>isexternal</em> determines
855 if the floor is part of the building's external framework, or is part of the
856 current floor (is either True or False). <em>Name</em> is a user-defined name
858 <p align="left"><strong>3. AddWall</strong> - adds a textured wall with the
859 specified dimensions to the current floor/level<br>
860 Syntax: <font size="2" face="Courier New, Courier, mono">AddWall <em>name,
861 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>, <em>z2</em>,
862 <em>height1</em>, <em>height2</em>, <em>voffset1</em>, <em>voffset2</em>,
863 <em>tw</em>, <em>th</em>, <em>isexternal</em></font><br>
864 Example: <font size="2" face="Courier New, Courier, mono">AddWall My Wall,
865 brick, 0.5, -10, -10, 10, 10, 10, 10, 0, 0, 0, 0, False</font></p>
866 <p align="left"><em>Height1</em> is the wall height in feet at the first coordinate
867 set (x1 and z1), and <em>height2</em> is for the second set (x2, and z2).
868 <em>Voffset1</em> is the vertical offset in feet (from the floor's altitude)
869 for the first coordinate set, and <em>voffset2</em> is for the second set.
870 <em>Tw</em> and <em>th</em> are the texture sizing/tiling multipliers, and
871 <em>isexternal</em> determines if the wall is part of the building's external
872 framework (true) or if it's part of the current floor (false).</p>
873 <p align="left"><strong>4. AddInterfloorFloor</strong> - adds a textured floor
874 below the floor of the current floor/level<br>
875 Syntax: <font size="2" face="Courier New, Courier, mono">AddInterfloorFloor
876 <em>name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
877 <em>z2</em>, <em>voffset1</em>, <em>voffset2, tw</em>, <em>th</em></font><br>
878 Example: <font size="2" face="Courier New, Courier, mono">AddInterfloorFloor
879 My IFloor, brick, 0.5, -10, -10, 10, 10, 0, 0, 0, 0</font></p>
880 <p align="left">The parameters are the same as the AddFloor command, except
881 the <em>voffset</em> values are the height offset in feet above the current
882 floor's altitude, and not above the base floor level.</p>
883 <p align="left"><strong>5. AddInterfloorWall</strong> - adds a textured wall
884 below the floor of the current floor/level<br>
885 Syntax: <font size="2" face="Courier New, Courier, mono">AddInterfloorWall
886 <em>name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
887 <em>z2</em>, <em>height1</em>, <em>height2</em>, <em>voffset1</em>, <em>voffset2</em>,
888 <em>tw</em>, <em>th</em></font></p>
889 <p align="left">The parameters are the same as the AddWall command, and the
890 <em>voffset</em> values are the same as the AddInterfloorFloor command.</p>
891 <p align="left"><strong>6. AddShaftFloor</strong> - adds a textured floor to
892 the specified shaft, on the current floor<br>
893 Syntax: <font size="2" face="Courier New, Courier, mono">AddShaftFloor <em>number,
894 name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
895 <em>z2</em>, <em>voffset1</em>, <em>voffset2, tw</em>, <em>th</em></font><br>
896 Example: <font size="2" face="Courier New, Courier, mono">AddShaftFloor 1,
897 My Floor, brick, 0.5, -10, -10, 10, 10, 0, 0, 0, 0</font></p>
898 <p align="left">The parameters are the same as the AddFloor command, and the
899 <em>number</em> value is the shaft number to use. The x1, z1, x2, and z2 parameters
900 are offsets of the shaft's origin (similar to creating elevator walls and
902 <p align="left"><strong>7. AddShaftWall</strong> - adds a textured wall to the
903 specified shaft, on the current floor<br>
904 Syntax: <font size="2" face="Courier New, Courier, mono">AddShaftWall <em>number,
905 name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
906 <em>z2</em>, <em>height1</em>, <em>height2</em>, <em>voffset1</em>, <em>voffset2</em>,
907 <em> tw</em>, <em>th</em></font></p>
908 <p align="left">The parameters are the same as the AddWall command, and the
909 <em>number</em> value is the shaft number to use. Also, the x1, z1, x2, and
910 z2 parameters are offsets of the shaft's origin (similar to creating elevator
911 walls and floors)</p>
912 <p align="left"><strong>8. AddStairsFloor</strong> - adds a textured floor to
913 the specified stairwell, on the current floor<br>
914 Syntax: <font size="2" face="Courier New, Courier, mono">AddStairsFloor <em>number,
915 name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
916 <em>z2</em>, <em>voffset1</em>, <em>voffset2, tw</em>, <em>th</em></font><br>
917 Example: <font size="2" face="Courier New, Courier, mono">AddStairsFloor 1,
918 My Floor, brick, 0.5, -10, -10, 10, 10, 0, 0, 0, 0</font></p>
919 <p align="left">The parameters are the same as the AddFloor command, and the
920 <em>number</em> value is the stairwell number to use</p>
921 <p align="left"><strong>9. AddStairsWall</strong> - adds a textured wall to
922 the specified stairwell, on the current floor<br>
923 Syntax: <font size="2" face="Courier New, Courier, mono">AddStairsWall <em>number,
924 name, texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>,
925 <em>z2</em>, <em>height1</em>, <em>height2</em>, <em>voffset1</em>, <em>voffset2</em>,
926 <em>tw</em>, <em>th</em></font></p>
927 <p align="left">The parameters are the same as the AddWall command, and the
928 <em>number</em> value is the stairwell number to use. Also, the x1, z1, x2,
929 and z2 parameters are offsets of the stairwell's origin (similar to creating
930 elevator walls and floors) </p>
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
934 Syntax: <font size="2" face="Courier New, Courier, mono">CreateWallBox <em>destobject</em>,
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 size="2" face="Courier New, Courier, mono">CreateWallBox external,
939 My Box, brick, -10, 10, -10, 10, 15, 0, 0, 0, true, true, true, true</font></p>
940 <p align="left">For parameter information, see the CreateWallBox command above.
941 In this command, the default voffset is the floor's altitude.</p>
942 <p align="left"><strong>11. ColumnWallBox2</strong> - creates 4 walls (box)
943 at a specified central location, as part of the current floor's columnframe
945 Syntax: <font size="2" face="Courier New, Courier, mono">CreateWallBox2 <em>destobject</em>,
946 <em>name, texturename</em>, <em>centerx</em>, <em>centerz</em>, <em>widthx</em>,
947 <em>lengthz</em>, <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em><em>,
948 inside, outside, top, bottom </em></font><br>
949 Example: <font size="2" face="Courier New, Courier, mono">CreateWallBox2 external,
950 My Box, brick, 0, 0, 10, 10, 15, 0, 0, 0, false, true, false, false</font></p>
951 <p align="left">For parameter information, see the CreateWallBox2 command above.
952 In this command, the default voffset is the floor's altitude.</p>
953 <p align="left"><strong>12. CallButtonElevators</strong> - comma-separated list
954 of elevators the next created call button set will work with (this must be
955 specified before CreateCallButtons)<br>
956 Example: <font size="2" face="Courier New, Courier, mono">CallButtonElevators
957 = 1, 2, 3, 4</font></p>
958 <p align="left"> <strong>13. CreateCallButtons</strong> - creates a call button
960 Syntax: <font size="2" face="Courier New, Courier, mono">CreateCallButtons<em>
961 BackTexture</em>, <em>UpButtonTexture</em>, <em>UpButtonTexture_Lit, DownButtonTexture,
962 DownButtonTexture_Lit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight,
964 </em></font>Example:<font size="2" face="Courier New, Courier, mono"><em>
965 </em>Create Marble, CallButtonsUp, CallButtonsUpLit, CallButtonsDown, CallButtonsDownLit,
966 -10, 0, 4, right, 0.5, 1, true, 1, 1</font></p>
967 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
969 <p align="left"><em>UpButtonTexture</em> and <em>DownButtonTexture</em> are
970 the textures used for the buttons themselves (unlit). <em>UpButtonTexture_Lit</em>
971 and <em>DownButtonTexture_Lit</em> specify the lit button textures.</p>
972 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
973 of the call button set object</p>
974 <p align="left"><em>voffset</em> is the altitude offset that the object is above
976 <p align="left"><em>direction </em>determines the direction the call buttons
978 'front' means they face towards the front of the building<br>
979 'back' means they face towards the back of the building<br>
980 'left' means they face left<br>
981 'right' means they face right</p>
982 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
983 height of the wall plate</p>
984 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
985 and is either true or false</p>
986 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
988 <p align="left">The up and down buttons will be automatically created based
989 on the range of the first specified elevator in the CallButtonElevators command
991 <p align="left"><strong>14. AddStairs</strong> - creates a custom staircase
992 at the specified location.<br>
993 Syntax: <font size="2" face="Courier New, Courier, mono">AddStairs<em> number,
994 name, texture, direction, CenterX, CenterZ, width, risersize, treadsize, num_stairs,
995 voffset, tw, th</em></font><br>
996 Example: <font size="2" face="Courier New, Courier, mono">AddStairs 1, TestStairs,
997 Brick, left, 10, 15, 5, 0.5, 0.5, 10, 0, 0, 0</font></p>
998 <p align="left">The <em>direction</em> parameter specifies the direction the
999 staircase faces (where the bottom step is), and so if a staircase goes up
1000 from left to right, the direction would be <em>left</em>. <em>Width</em> specifies
1001 the step width; <em>risersize</em> specifies the height of each step riser
1002 (vertical portion); <em>treadsize</em> specifies the length of each step tread/run
1003 (horizontal portion); <em>num_stairs</em> specifies the total number of steps
1004 to create (including the above landing platform, but not including the base
1005 platform). To calculate the length of the staircase, multiply <em>(num_stairs</em>
1006 - 1) with <em>treadsize</em>; in the above example, that would be 9 * 0.5.
1007 To determine the height of the staircase, multiply <em>num_stairs</em> with
1008 <em>risersize</em>. Note that the tread of the top step is not drawn (the
1009 top step is the landing platform); therefore for a staircase containing 10
1010 steps, the total staircase width would be comprised of 9 treads (which is
1011 why the length calculation used num_stairs minus 1).</p>
1012 <p align="left"><strong>15. AddDoor</strong> - adds a textured door in the specified
1013 location, and performs a wall cut on that area (this must be called after
1014 the associated wall is created)<br>
1015 Syntax: <font size="2" face="Courier New, Courier, mono">AddDoor <em> texturename,
1016 thickness</em>, <em>direction, CenterX</em>, <em>CenterZ</em>, <em>width</em>,
1017 <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font></p>
1018 <p align="left">Direction specifies the direction the door faces (the side in
1019 which the handle is on the left) and also the direction it opens. These are
1021 1 - faces left, opens left<br>
1022 2 - faces left, opens right<br>
1023 3 - faces right, opens right<br>
1024 4 - faces right, opens left<br>
1025 5 - faces front, opens front<br>
1026 6 - faces front, opens back<br>
1027 7 - faces back, opens back<br>
1028 8 - faces back, opens front<br>
1030 <p align="left"><strong>16. AddStairsDoor</strong> - adds a textured door for
1031 the specified stairwell, in a location relative to the stairwell's center.
1032 This also performs a wall cut on that area (this must be called after the
1033 associated wall is created)<br>
1034 Syntax: <font size="2" face="Courier New, Courier, mono">AddStairsDoor <em>
1035 number, texturename, thickness</em>, <em>direction, CenterX</em>, <em>CenterZ</em>,
1036 <em>width</em>, <em>height</em>, <em>voffset</em>, <em>tw</em>, <em>th</em></font></p>
1037 <p align="left">Number specifies the stairwell number. Direction specifies the
1038 direction the door faces and also the direction it opens. For values of this,
1039 look at the AddDoor command above.</p>
1040 <p align="left"><strong>17. AddDirectionalIndicator</strong> - creates a single
1041 elevator directional indicator/lantern on the current floor (similar to the
1042 CreateCallButtons command) <br>
1043 Syntax: <font size="2" face="Courier New, Courier, mono">AddDirectionalIndicator<em>
1044 Elevator, Relative, ActiveDirection, Single, Vertical, BackTexture</em>, <em>UpTexture</em>,
1045 <em>UpTextureLit, DownTexture, DownTextureLit, CenterX, CenterZ, voffset,
1046 direction, BackWidth, BackHeight, ShowBack, tw, th<br>
1047 </em></font>Example:<font size="2" face="Courier New, Courier, mono"><em>
1048 AddDirectionalIndicator 1, true, false, false, true, Metal, UpLight, UpLightOn, DownLight,
1049 DownLightOn, -3, -4.162, 6, front, 0.5, 1, true, 0, 0</em></font></p>
1050 <p align="left">This command will create a directional indicator on the current
1051 floor (if ActiveDirection is false, then it'll only create it if the elevator
1052 serves that floor). It'll also automatically create the up and down lights
1053 depending on the floor.</p>
1054 <p align="left"><em>Elevator</em> specifies the elevator to create the indicators
1056 <p align="left"><em>Relative</em> determines if the X and Z coordinates are
1057 relative to the elevator's origin (center) or not.</p>
1058 <p align="left"><em>ActiveDirection</em> determines if the indicator should continuously
1059 display the active elevator direction (true), or if it should show the elevator's
1060 direction for the current call (false, default)</p>
1061 <p align="left"><em>Single</em> determines if a single indicator light should
1062 be created instead of two. If this is true, the unlit texture is specified
1063 in <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
1064 <p align="left"><em>Vertical</em> determines if the two lights should be vertically
1065 separated (true), or horizontally separated (false)</p>
1066 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
1068 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
1069 used for the lights themselves, and the "Lit" texures are the ones
1070 to show when the light is on. <em>DownTexture</em> is ignored if <em>Single</em>
1072 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
1073 of the indicators</p>
1074 <p align="left"><em>voffset</em> is the altitude offset that the object is above
1076 <p align="left"><em>direction </em>determines the direction the indicators face:<br>
1077 'front' means they face towards the front of the building<br>
1078 'back' means they face towards the back of the building<br>
1079 'left' means they face left<br>
1080 'right' means they face right</p>
1081 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
1082 height of the wall plate</p>
1083 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
1084 and is either true or false</p>
1085 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
1087 <p align="left"><strong>18. AddShaftDoor</strong> - creates shaft elevator doors
1088 on the current floor only<br>
1089 Syntax: <font size="2" face="Courier New, Courier, mono">AddShaftDoor<em>
1090 elevator, number, lefttexture, righttexture</em>, <em>tw, th</em></font></p>
1091 <p align="left">The AddShaftDoor command creates working shaft elevator doors
1092 on the current floor only - the other command, <em>AddShaftDoors</em> (in
1093 the <em>elevator</em> section) creates all shaft doors in a single command.
1094 This command is useful for specifying different textures for shaft doors depending
1095 on the floor, and also for only creating shaft doors on one side if an elevator
1096 serves a specific floor. The <em>SetShaftDoors</em> command in the elevator
1097 section must be used before using this command. Parameters such as width,
1098 height, and direction are taken from the <em>AddDoors</em> command (so the
1099 regular elevator doors need to be created first). These doors should be moved
1100 slightly away from the elevator doors (to separate them both). Also, this
1101 command cuts any shaft walls that are within the door area (and so this must
1102 be called after the shaft walls are created). <em>Number</em> specifies the
1103 number of the door to create (related to the <em>Doors</em> command) - if
1104 the elevator only has one door, or if the <em>Doors</em> command was not used,
1106 <p align="left"><strong>19. AddFloorIndicator</strong> - creates a floor indicator
1107 associated with a specific elevator<br>
1108 Syntax: <font size="2" face="Courier New, Courier, mono">AddFloorIndicator<em>
1109 elevator, relative, texture_prefix, direction, CenterX, CenterZ, width, height,
1110 voffset</em></font> </p>
1111 <p align="left">The AddFloorIndicator command creates a floor indicator at the
1112 position specified by <em>CenterX</em> and <em>CenterZ</em>, associated with
1113 the elevator specified by <em>elevator</em>. <em>Direction</em> is the direction
1114 the indicator faces, and can be either "left", "right",
1115 "front" or "back". <em>Relative</em> determines if the
1116 <em>CenterX</em> and <em>CenterZ</em> values are relative of the elevator's
1117 center or not. This command can be given multiple times to create multiple
1118 indicators. Texture_prefix is the base name of the texture to load when displaying
1119 a floor ID; for example if the indicator is on floor 3, and you specify a
1120 prefix of "Button", it'll load the "Button3" texture.</p>
1121 <p align="left"><strong>20. Cut</strong> - performs a manual box cut on an area
1122 within the current floor<br>
1123 Syntax: <font size="2" face="Courier New, Courier, mono">Cut x1, y1, z1, x2,
1124 y2, z2, cutwalls, cutfloors<br>
1125 </font>Example: <font size="2" face="Courier New, Courier, mono">Cut -5, -5,
1126 -5, 5, 5, 5, false, true</font></p>
1127 <p align="left">The x, y and z values specify the start and end coordinates
1128 of the box cut. The Y values are relative to the current floor's altitude.
1129 If cutwalls is true, the function will cut walls; if cutfloors is true, it'll
1131 <p align="left"><strong>21. CutAll</strong> - performs a manual box cut on all
1132 objects associated with the current floor (the level itself, interfloor, shafts
1134 Syntax: <font size="2" face="Courier New, Courier, mono">CutAll x1, y1, z1,
1135 x2, y2, z2, cutwalls, cutfloors<br>
1136 </font>Example: <font size="2" face="Courier New, Courier, mono">CutAll -5,
1137 -5, -5, 5, 5, 5, false, true</font></p>
1138 <p align="left">The x, y and z values specify the start and end coordinates
1139 of the box cut. The Y values are relative to the current floor's altitude.
1140 If cutwalls is true, the function will cut walls; if cutfloors is true, it'll
1142 <p align="left"><strong>22. AddFillerWalls</strong> - helper function to add
1143 fillers around a door's cut location. When a door is created, the wall in
1144 it's location is cut to provide space; after the cut, the sides are open (if
1145 the wall has thickness) - this creates a covering wall on each side and a
1146 floor above the door frame to fill the area.<br>
1147 Syntax: <font size="2" face="Courier New, Courier, mono">AddFillerWalls texture,
1148 thickness, CenterX, CenterZ, width, height, voffset, direction, tw, th<br>
1149 </font>Example: <font size="2" face="Courier New, Courier, mono">AddFillerWalls
1150 ConnectionWall, 0.5, -10, 0, 3.5, 8, 0, true, 0, 0</font></p>
1151 <p align="left">The parameters in this function are similar to the related door's
1152 parameters. Direction is either true if the door faces the front/back (width
1153 is along the X axis), or false if the door faces left/right (width is along
1155 <p align="left"><strong>23. AddSound</strong> - creates a user-defined looping
1156 sound at the specified position<br>
1157 Syntax: <font size="2" face="Courier New, Courier, mono">AddSound <em>name,
1158 filename, x, y, z[, volume, speed, min_distance, max_distance, dir_radiation,
1159 direction_x, direction_y, direction_z]</em></font><br>
1160 Example 1: <font size="2" face="Courier New, Courier, mono">AddSound MySound,
1161 data/sound.wav, 10, 100, 5<br>
1162 </font>Example 2: <font size="2" face="Courier New, Courier, mono">AddSound
1163 MySound, data/sound.wav, 10, 100, 5, 1, 100, 1, -1, 0, 0, 0, 0</font></p>
1164 <p align="left">For information on the parameters, see the AddSound command
1165 in the Globals section. The only difference here is that the Y value is relative
1166 of the floor's base (altitude plus interfloor height).</p>
1167 <p align="left"><strong>24. AddShaftDoorComponent</strong> - creates a single
1168 shaft door component, used for creating custom door styles<br>
1169 Syntax: <font size="2" face="Courier New, Courier, mono">AddShaftDoorComponent
1170 <em>elevator, number, name, texture, sidetexture, thickness, direction, speed,
1171 x1, z1, x2, z2, height, voffset, tw, th, side_tw, side_th</em></font></p>
1172 <p align="left">This command is almost identical to the AddDoorComponent command (in the elevator section below -
1173 see that for more information), except that it creates shaft doors. Use the FinishShaftDoor command after
1174 creating the components. This command replaces the AddShaftDoor command.</p>
1175 <p align="left"><strong>25. FinishShaftDoor</strong> - finishes shaft door creation
1176 - use this after all related AddShaftDoorComponent commands are used, or specify
1177 it without the AddShaftDoorComponent commands if you're creating a manual
1179 Syntax: <font size="2" face="Courier New, Courier, mono">FinishShaftDoor<em>
1180 elevator, number</em></font></p>
1181 <p align="left">This command is almost identical to the FinishDoors command (in the elevator section below -
1182 see that for more information) except that it's used for finishing a shaft door.</p>
1183 <p align="left"> </p>
1184 <p align="left"><strong><font size="+1"><a name="Elevator"></a>6. The <em>Elevator</em>
1185 Section</font></strong></p>
1186 <p align="left">The <em>Elevator</em> section allows you to create elevators
1187 for your building. Elevators are numbered, starting with 1. Parameters that
1188 have defaults listed are optional.</p>
1189 <p align="left">The section headers and footers are similar to the ones in the
1191 To specify a single elevator, you would type something like:<br>
1192 <font size="2" face="Courier New, Courier, mono"><Elevator 1></font><br>
1193 and end it with:<br>
1194 <font size="2" face="Courier New, Courier, mono"><EndElevator></font><br>
1196 For a range of elevators, you would use something like:<br>
1197 <font size="2" face="Courier New, Courier, mono"><Elevators 2 to 10></font><br>
1199 <font size="2" face="Courier New, Courier, mono"><EndElevators></font></p>
1200 <p align="left"><strong>Variables:</strong></p>
1201 <p align="left"><font size="2" face="Courier New, Courier, mono"><strong>%elevator%</strong></font>
1202 - number of the current elevator</p>
1203 <p align="left"><strong>Parameters</strong>:</p>
1204 <p align="left"><strong>1. Name</strong> - sets the name of the elevator<br>
1205 Example: <font size="2" face="Courier New, Courier, mono">Name = Service Elevator</font></p>
1206 <p align="left"><strong>2. Speed</strong> - maximum speed of the elevator, in
1208 Example: <font size="2" face="Courier New, Courier, mono">Speed = 20</font></p>
1209 <p align="left"><strong>3. Acceleration</strong> - acceleration speed of the
1210 elevator, in feet per second<br>
1211 Example: <font size="2" face="Courier New, Courier, mono">Acceleration = 0.015</font></p>
1212 <p align="left"><strong>4. Deceleration</strong> - deceleration speed of the
1213 elevator, in feet per second<br>
1214 Example: <font size="2" face="Courier New, Courier, mono">Deceleration = 0.0075</font></p>
1215 <p align="left"><strong>5. OpenSpeed</strong> - open/close speed of the elevator
1216 doors. This must be specified after the CreateElevator command.<br>
1217 Syntax: <font size="2" face="Courier New, Courier, mono">OpenSpeed <em>doornumber</em>
1218 = <em>value</em></font><br>
1219 Example: <font size="2" face="Courier New, Courier, mono">OpenSpeed 1 = 0.2</font></p>
1220 <p align="left"><strong>6. ServicedFloors</strong> - a comma-separated list
1221 of floors this elevator services. Ranges can also be specified by putting
1222 a "-" between the numbers<br>
1223 Example: <font size="2" face="Courier New, Courier, mono">ServicedFloors =
1224 0, 5, 6, 7-30, 31</font></p>
1225 <p align="left"><strong>7. AssignedShaft</strong> - the shaft number this elevator
1227 Example: <font size="2" face="Courier New, Courier, mono">AssignedShaft =
1229 <p align="left"><strong>8. DoorTimer</strong> - the length of time (in milliseconds)
1230 that the elevator doors should stay open before automatically closing. The
1231 default is 5000, or 5 seconds. This must be specified after the CreateElevator
1233 Syntax: <font size="2" face="Courier New, Courier, mono">DoorTimer <em>doornumber</em>
1234 = <em>value</em></font><br>
1235 Example: <font size="2" face="Courier New, Courier, mono">DoorTimer 1 = 10000</font></p>
1236 <p align="left"><strong>9. OpenSound</strong> - the sound file to play when
1237 the elevator doors open. Default is <em>elevatoropen.wav</em>. This must be
1238 specified after the CreateElevator command.<br>
1239 Syntax: <font size="2" face="Courier New, Courier, mono">OpenSound <em>doornumber</em>
1240 = <em>filename</em></font><br>
1241 Example: <font size="2" face="Courier New, Courier, mono">OpenSound 1 = open.wav</font></p>
1242 <p align="left"><strong>10. CloseSound</strong> - the sound file to play when
1243 the elevator doors close. Default is <em>elevatorclose.wav</em>. This must
1244 be specified after the CreateElevator command.<br>
1245 Syntax: <font size="2" face="Courier New, Courier, mono">CloseSound <em>doornumber</em>
1246 = <em>filename</em></font><br>
1247 Example: <font size="2" face="Courier New, Courier, mono">CloseSound 1 = close.wav</font></p>
1248 <p align="left"><strong>11. CarStartSound</strong> - the sound file to play
1249 when the elevator starts moving/speeds up. By default no sound is played.<br>
1250 Example: <font size="2" face="Courier New, Courier, mono">CarStartSound =
1251 start.wav</font></p>
1252 <p align="left"><strong>12. CarMoveSound</strong> - the sound file to play while
1253 the elevator is moving. This file is automatically looped by the simulator.
1254 By default no sound is played.<br>
1255 Example: <font size="2" face="Courier New, Courier, mono">CarMoveSound = move.wav</font></p>
1256 <p align="left"><strong>13. CarStopSound</strong> - the sound file to play when
1257 the elevator slows down and stops. By default no sound is played.<br>
1258 Example: <font size="2" face="Courier New, Courier, mono">CarStopSound = stop.wav</font></p>
1259 <p align="left"><strong>14. CarIdleSound</strong> - the sound file to play when
1260 the elevator is idle. Default is <em>elevidle.wav</em>.<br>
1261 Example: <font size="2" face="Courier New, Courier, mono">CarIdleSound = idle.wav</font></p>
1262 <p align="left"><strong>15. MotorStartSound</strong> - the sound file to play
1263 when the elevator motor starts moving/speeds up. Default is <em>elevstart.wav</em>.<br>
1264 Example: <font size="2" face="Courier New, Courier, mono">MotorStartSound
1265 = start.wav</font></p>
1266 <p align="left"><strong>16. MotorRunSound</strong> - the sound file to play
1267 while the elevator motor is running. This file is automatically looped by
1268 the simulator. Default is <em>elevmove.wav</em>.<br>
1269 Example: <font size="2" face="Courier New, Courier, mono">MotorRunSound =
1271 <p align="left"><strong>17. MotorStopSound</strong> - the sound file to play
1272 when the elevator motor slows down and stops. Default is <em>elevstop.wav</em>.<br>
1273 Example: <font size="2" face="Courier New, Courier, mono">MotorStopSound =
1275 <p align="left"><strong>18. MotorIdleSound</strong> - the sound file to play
1276 when the elevator motor is idling. There is no default yet.<br>
1277 Example: <font size="2" face="Courier New, Courier, mono">MotorIdleSound =
1279 <p align="left"><strong>19. ChimeSound</strong> - the sound file to play when
1280 the elevator arrives at a floor. Default is <em>chime1.wav</em>. This must
1281 be specified after the CreateElevator command. This is used for both up and
1283 Syntax: <font size="2" face="Courier New, Courier, mono">ChimeSound <em>doornumber</em>
1284 = <em>filename</em></font><br>
1285 Example: <font size="2" face="Courier New, Courier, mono">ChimeSound 1 = chime.wav</font></p>
1286 <p align="left"><strong>20. UpChimeSound</strong> - the sound file to play when
1287 the elevator arrives at a floor and it's direction is up. Default is <em>chime1.wav</em>.
1288 This must be specified after the CreateElevator command.<br>
1289 Syntax: <font size="2" face="Courier New, Courier, mono">UpChimeSound <em>doornumber</em>
1290 = <em>filename</em></font><br>
1291 Example: <font size="2" face="Courier New, Courier, mono">UpChimeSound 1 =
1292 chime.wav</font></p>
1293 <p align="left"><strong>21. DownChimeSound</strong> - the sound file to play
1294 when the elevator arrives at a floor and it's direction is down. Default is
1295 <em>chime1.wav</em>. This must be specified after the CreateElevator command.<br>
1296 Syntax: <font size="2" face="Courier New, Courier, mono">DownChimeSound <em>doornumber</em>
1297 = <em>filename</em></font><br>
1298 Example: <font size="2" face="Courier New, Courier, mono">DownChimeSound 1
1299 = chime.wav</font></p>
1300 <p align="left"><strong>22. AlarmSound</strong> - the sound file to play when
1301 the elevator alarm button is pressed. Default is <em>bell1.wav</em>.<br>
1302 Example: <font size="2" face="Courier New, Courier, mono">AlarmSound = bell2.wav</font></p>
1303 <p align="left"><strong>23. AlarmSoundStop</strong> - the sound file to play
1304 when the elevator alarm button is released. Default is <em>bell1-stop.wav</em>.<br>
1305 Example: <font size="2" face="Courier New, Courier, mono">AlarmSoundStop =
1306 bell2-stop.wav</font></p>
1307 <p align="left"><strong>24. BeepSound</strong> - the sound file to play when
1308 the elevator reaches a new floor. There is no default; if this is set, the
1309 beeps will be automatically enabled.<br>
1310 Example: <font size="2" face="Courier New, Courier, mono">BeepSound = beep.wav</font></p>
1311 <p align="left"><strong>25. FloorSound</strong> - the sound file(s) to play
1312 when the elevator arrives at a floor; normally this is used for files that
1313 speak the floor number. There is no default; if this is set, the sounds will
1314 be automatically enabled. If an asterisk (*) is specified, it is replaced
1315 with the current floor number.<br>
1316 Example: <font size="2" face="Courier New, Courier, mono">FloorSound = floor*.wav</font></p>
1317 <p align="left"><strong>26. FloorSkipText</strong> - sets the text that will
1318 be shown in the floor indicator when passing non-serviced floors. The texture
1319 for this must be loaded for it to show - of you set this to EX for example,
1320 the texture it'll load is ButtonEX.jpg. Common values for this are EZ, X,
1321 and EX (which stand for Express Zone).<br>
1322 Example: <font size="2" face="Courier New, Courier, mono">FloorSkipText =
1324 <p align="left"><strong>27. RecallFloor</strong> - sets the floor the elevator
1325 will recall to during fire service phase 1 mode. Default is the lowest serviced
1327 Example: <font size="2" face="Courier New, Courier, mono">RecallFloor = 5</font></p>
1328 <p align="left"><strong>28. AlternateRecallFloor</strong> - sets the alternate
1329 floor the elevator will recall to during fire service phase 1 mode. Default
1330 is the highest serviced floor. <br>
1331 Example: <font size="2" face="Courier New, Courier, mono">AlternateRecallFloor
1333 <p align="left"><strong>29. ACP</strong> - enables ACP (Anti-Crime Protection)
1335 Example: <font size="2" face="Courier New, Courier, mono">ACP = true</font></p>
1336 <p align="left"><strong>30. ACPFloor</strong> - sets the floor the elevator
1337 will stop at while in ACP mode. Default is the lowest serviced floor. <br>
1338 Example: <font size="2" face="Courier New, Courier, mono">ACPFloor = 5</font></p>
1339 <p align="left"><strong>31. Doors</strong> - sets the number of doors the elevator
1340 will have. The default is 1. Set to 0 in order to have a doorless elevator.<br>
1341 Example: <font size="2" face="Courier New, Courier, mono">Doors = 2</font></p>
1342 <p align="left"><strong>32. MotorPosition</strong> - sets the position of the
1343 motor sound emitter; if this command is not specified, it'll be placed at
1344 the base (altitude + interfloor) of the highest floor in the corresponding
1345 shaft. The X and Z values are relative of the elevator center.<br>
1346 Syntax: <font size="2" face="Courier New, Courier, mono">MotorPosition = x,
1348 </font>Example: <font size="2" face="Courier New, Courier, mono">MotorPosition
1350 <p align="left"><strong>33. QueueResets</strong> - set this to true if you want
1351 the elevator to reset the related queue (up or down) after it reaches the
1352 last valid entry. If the elevator is moving up for example with this setting
1353 on, and you press buttons for floors below you, the elevator will remove those
1354 entries after it reaches the highest selected floor.<br>
1355 Example: <font size="2" face="Courier New, Courier, mono">QueueResets = true</font></p>
1356 <p align="left"><strong>34. UpPeak</strong> - enables up peak mode for this
1358 Example: <font size="2" face="Courier New, Courier, mono">UpPeak = true</font></p>
1359 <p align="left"><strong>35. DownPeak</strong> - enables down peak mode for this
1361 Example: <font size="2" face="Courier New, Courier, mono">DownPeak = true</font></p>
1362 <p align="left"><strong>36. IndependentService</strong> - enables independent
1363 service mode for this elevator.<br>
1364 Example: <font size="2" face="Courier New, Courier, mono">IndependentService
1366 <p align="left"><strong>37. InspectionService</strong> - enables inspection
1367 service mode for this elevator.<br>
1368 Example: <font size="2" face="Courier New, Courier, mono">InspectionService
1370 <p align="left"><strong>38. Parking</strong> - enables automatic elevator parking.
1371 If this option is used, the elevator will automatically send itself to the
1372 specified parking floor after the number of seconds specified in <em>delay</em>.
1374 Syntax: <font size="2" face="Courier New, Courier, mono">Parking = <em>floor,
1375 delay</em></font></p>
1376 <p align="left"><strong>39. LevelingSpeed</strong> - elevator's leveling speed.
1378 Syntax: <font size="2" face="Courier New, Courier, mono">LevelingSpeed = <em>speed</em></font></p>
1379 <p align="left"><strong>40. LevelingOffset</strong> - distance in feet from
1380 the destination floor that the elevator will switch into leveling mode. Default
1382 Syntax: <font size="2" face="Courier New, Courier, mono">LevelingOffset =
1383 <em>distance</em></font></p>
1384 <p align="left"><strong>41. LevelingOpen</strong> - distance in feet from the
1385 destination floor that the elevator will open the doors. Default is 0.<br>
1386 Syntax: <font size="2" face="Courier New, Courier, mono">LevelingOpen = <em>distance</em></font></p>
1387 <p align="left"> </p>
1388 <p align="left"><strong>Commands:</strong></p>
1389 <p align="left"><strong>1. CreateElevator</strong> - creates an elevator at
1390 the specified location<br>
1391 Syntax: <font size="2" face="Courier New, Courier, mono">CreateElevator <em>relative,
1392 x</em>, <em>z</em>, <em>floor<br>
1393 </em></font>Example:<font size="2" face="Courier New, Courier, mono"><em>
1394 </em>CreateElevator false, 0, 10, 0</font></p>
1395 <p align="left"><em>Relative </em>determines if the coordinates are relative
1396 to the shaft center, or if they're absolute, <em>X</em> and <em>Z </em>are
1397 the coordinates to place the center of the elevator at, and <em>Floor</em>
1398 is the floor to place the elevator on.</p>
1399 <p align="left"><strong>2. AddFloor</strong> - adds a textured floor with the
1400 specified dimensions for the elevator<br>
1401 Syntax: <font size="2" face="Courier New, Courier, mono">AddFloor <em>name,
1402 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>, <em>z2</em>,
1403 <em>voffset1</em>, <em>voffset2, tw</em>, <em>th</em></font><br>
1404 Example: <font size="2" face="Courier New, Courier, mono">AddFloor Floor1,
1405 Wood2, 0.5, -3.5, -3, 3.5, 3, 0, 0, 0, 0</font></p>
1406 <p align="left"><strong>3. AddWall</strong> - adds a textured wall for the elevator<br>
1407 Syntax: <font size="2" face="Courier New, Courier, mono">AddWall <em>name,
1408 texturename</em>, <em>thickness, x1</em>, <em>z1</em>, <em>x2</em>, z2, <em>height1</em>,
1409 <em>height2</em>, <em>voffset1</em>, <em>voffset2, </em><em>tw</em>, <em>th</em></font><br>
1410 Example: <font size="2" face="Courier New, Courier, mono">AddWall Wall1, Wood1,
1411 0.5, -3.5, 3, 3.5, 3, 8, 8, 0, 0, 2, 2</font></p>
1412 <p align="left">The elevator's AddWall command is similar to the other AddWall
1414 <p align="left"><strong>4. AddDoors</strong> - creates elevator doors<br>
1415 Syntax: <font size="2" face="Courier New, Courier, mono">AddDoors <em>number,
1416 lefttexture, righttexture</em>, <em>thickness, CenterX, CenterZ, width, height,
1417 direction, tw, th</em></font></p>
1418 <p align="left">The AddDoors command creates working elevator doors at the central
1419 location specified by <em>CenterX</em> and <em>CenterZ</em>, with <em>width</em>
1420 and <em>height</em> specifiying the width and height of each door, and <em>Direction</em>
1421 specifying the direction that the doors face (currently there are only 2:
1422 <em>false</em> if the doors are on the left or right sides, and <em>true</em>
1423 if the doors are on the front or back sides). <em>Number</em> specifies the
1424 number of the door to create (related to the <em>Doors</em> command) - if
1425 the elevator only has one door, or if the Doors command was not used, specify
1427 <p align="left"><strong>5. AddShaftDoors</strong> - creates shaft elevator doors<br>
1428 Syntax: <font size="2" face="Courier New, Courier, mono">AddShaftDoors <em>number,
1429 lefttexture, righttexture</em>, <em>thickness, CenterX, CenterZ, tw, th</em></font></p>
1430 <p align="left">The AddShaftDoors command creates working shaft elevator doors
1431 at the central location specified by <em>CenterX</em> and <em>CenterZ</em>.
1432 Other parameters such as width, height, and direction are taken from the AddDoors
1433 command (so the regular elevator doors need to be created first). These doors
1434 should be moved slightly away from the elevator doors (to separate them both).
1435 Also, this command creates doors at all the floors specified in the ServicedFloors
1436 value, and cuts any shaft walls that are within the door area (and so this
1437 must be called after the shaft walls are created). <em>Number</em> specifies
1438 the number of the door to create (related to the <em>Doors</em> command) -
1439 if the elevator only has one door, or if the Doors command was not used, specify
1441 <p align="left"><strong>6. CreatePanel</strong> - creates a button panel<br>
1442 Syntax: <font size="2" face="Courier New, Courier, mono">CreatePanel <em>texturename</em>,
1443 <em>rows, columns, direction, CenterX, CenterZ, buttonwidth, buttonheight,
1444 spacingX, spacingY, voffset, tw, th<br>
1445 </em></font> Example<font size="2" face="Courier New, Courier, mono"><em>:
1446 </em><font size="2" face="Courier New, Courier, mono">CreatePanel Wall1, 5,
1447 5, right, -3, -3, 0.15, 0.15, 0.3, 0.45, 4.5, 0, 0</font></font></p>
1448 <p align="left">The CreatePanel command creates a button panel at a position
1449 relative to the elevator's center position (origin). <em>Rows</em> and <em>Columns</em>
1450 define the grid size of the panel. <em>Direction</em> is either "front",
1451 "back", "left" or "right", defining which direction
1452 the panel faces. <em>SpacingX</em> is the space (percent of a button's width)
1453 horizontally between each button, and <em>spacingY</em> is the space (percent
1454 of a button's height) vertically between each button. Not all positions need
1455 to be used; this is simply to provide a grid layout for the panel. This command
1456 also determines the width and height of the panel based on the spacing and
1457 button sizes. A simple formula for determining panel width or height is this
1458 - for width, it's (columns * buttonwidth) + (spacingX * (columns + 1)); for
1459 height, just swap columns with rows and spacingX with spacingY.</p>
1460 <p align="left"><strong>7. AddFloorButton</strong> - creates a floor button
1462 Syntax: <font size="2" face="Courier New, Courier, mono">AddFloorButton <em>panel_number,
1463 sound, texture_unlit</em>, <em>texture_lit, row, column, floor, width, height[,
1464 hoffset, voffset]</em></font><br>
1465 Example 1: <font size="2" face="Courier New, Courier, mono">AddFloorButton
1466 1, switch.wav, Button5, ButtonLit5, 7, 3, 4, 1, 1</font><br>
1467 Example 2: <font size="2" face="Courier New, Courier, mono">AddFloorButton
1468 1, , Button5, ButtonLit5, 7, 3, 4, 1, 1, 0.1, -0.1</font></p>
1469 <p align="left">The AddFloorButton command creates a floor button on the button
1470 panel created with CreatePanel. Panel_number specifies the number of the panel
1471 to add the button to. <em>Row</em> and <em>Column</em> specify the position
1472 on the grid where the button should be. <em>Floor</em> specifies the floor
1473 number that this button calls. <em>Width</em> and <em>Height</em> specify
1474 the width and height of the button, as a percentage of a single grid unit
1475 size (1 being 100%, 0.5 being 50%). If both values are 0, the default of 1
1476 is used for both values. If only one of the values is 0, then the exact size
1477 other is used; for example, if <em>width</em> is 0 and <em>height</em> is
1478 1 (or any other number), then the width will end up being the same size as
1479 the height. <em>Hoffset</em> and <em>Voffset</em> are optional parameters,
1480 and are used to position the button outside the normal grid, and are in grid
1481 units (buttonwidth and buttonheight parameters of the CreatePanel function).
1482 In the second example, the button is positioned 0.1 grid units to the right,
1483 and 0.1 grid units down. Notice that no sound is specified in the 2nd example
1484 - this means that a sound won't be played.</p>
1485 <p align="left"><strong>8. AddControlButton</strong> - creates a control button
1487 Syntax: <font size="2" face="Courier New, Courier, mono">AddControlButton
1488 <em>panel_number, sound, texture_unlit</em>, <em>texture_lit, row, column,
1489 type, width, height[, hoffset, voffset]</em></font></p>
1490 <p align="left">The AddControlButton command creates a command button on the
1491 panel created with CreatePanel. <em>Row</em> and <em>Column</em> are the same
1492 as the AddFloorButton command, and <em>Type</em> can be either "open",
1493 "close", "cancel", "stop" or "alarm".
1494 See the above command (AddFloorButton) for a description of the other parameters.</p>
1495 <p align="left"><strong>9. AddFloorIndicator</strong> - creates a floor indicator<br>
1496 Syntax: <font size="2" face="Courier New, Courier, mono">AddFloorIndicator<em>
1497 texture_prefix, direction, CenterX, CenterZ, width, height, voffset</em></font>
1499 <p align="left">The AddFloorIndicator command creates a floor indicator at the
1500 position (relative to the elevator) specified by <em>CenterX</em> and <em>CenterZ</em>.
1501 <em>Direction</em> is the direction the indicator faces, and can be either
1502 "left", "right", "front" or "back".
1503 This command can be given multiple times to create multiple indicators. Texture_prefix
1504 is the base name of the texture to load when displaying a floor ID; for example
1505 if the elevator is on floor 3, and you specify a prefix of "Button", it'll
1506 load the "Button3" texture.</p>
1507 <p align="left"><strong>10. AddDirectionalIndicator</strong> - creates an internal
1508 directional indicator/lantern<br>
1509 Syntax: <font size="2" face="Courier New, Courier, mono">AddDirectionalIndicator<em>
1510 ActiveDirection, Single, Vertical, BackTexture</em>, <em>UpTexture</em>, <em>UpTextureLit,
1511 DownTexture, DownTextureLit, CenterX, CenterZ, voffset, direction, BackWidth,
1512 BackHeight, ShowBack, tw, th<br>
1513 </em></font>Example:<font size="2" face="Courier New, Courier, mono"><em>
1514 AddDirectionalIndicator false, false, true, Metal, UpLight, UpLightOn, DownLight,
1515 DownLightOn, -3, -4.162, 6, front, 0.5, 1, true, 0, 0</em></font></p>
1516 <p align="left">This command will create a directional indicator inside the
1517 elevator, and the positioning is relative of the elevator's center.</p>
1518 <p align="left"><em>ActiveDirection</em> determines if the indicator should
1519 continuously display the active elevator direction (true), or if it should
1520 show the elevator's direction for the current call (false, default)</p>
1521 <p align="left"><em>Single</em> determines if a single indicator light should
1522 be created instead of two. If this is true, the unlit texture is specified
1523 in <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
1524 <p align="left"><em>Vertical</em> determines if the two lights should be vertically
1525 separated (true), or horizontally separated (false)</p>
1526 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
1528 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
1529 used for the lights themselves, and the "Lit" texures are the ones
1530 to show when the light is on. <em>DownTexture</em> is ignored if <em>Single</em>
1532 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
1533 of the indicators</p>
1534 <p align="left"><em>voffset</em> is the altitude offset that the object is above
1536 <p align="left"><em>direction </em>determines the direction the indicators face:<br>
1537 'front' means they face towards the front of the building<br>
1538 'back' means they face towards the back of the building<br>
1539 'left' means they face left<br>
1540 'right' means they face right</p>
1541 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
1542 height of the wall plate</p>
1543 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
1544 and is either true or false</p>
1545 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
1547 <p align="left"><strong></strong><strong>11. AddDirectionalIndicators</strong>
1548 - creates the elevator's exterior directional indicator/lanterns (similar
1549 to the CreateCallButtons command) <br>
1550 Syntax: <font size="2" face="Courier New, Courier, mono">AddDirectionalIndicators<em>
1551 Relative, ActiveDirection, Single, Vertical, BackTexture</em>, <em>UpTexture</em>,
1552 <em>UpTextureLit, DownTexture, DownTextureLit, CenterX, CenterZ, voffset,
1553 direction, BackWidth, BackHeight, ShowBack, tw, th<br>
1554 </em></font>Example:<font size="2" face="Courier New, Courier, mono"><em>
1555 AddDirectionalIndicators true, false, false, true, Metal, UpLight, UpLightOn,
1556 DownLight, DownLightOn, -3, -4.162, 6, front, 0.5, 1, true, 0, 0</em></font></p>
1557 <p align="left">This command will create directional indicators on all floors
1558 the elevator serves. It'll also automatically create the up and down lights
1559 depending on the floor. To create indicators on a per-floor basis, use the
1560 AddDirectionalIndicator command in the Floor section.</p>
1561 <p align="left"><em>Relative</em> determines if the X and Z coordinates are
1562 relative to the elevator's origin (center) or not.</p>
1563 <p align="left"><em>ActiveDirection</em> determines if the indicator should continuously
1564 display the active elevator direction (true), or if it should show the elevator's
1565 direction for the current call (false, default)</p>
1566 <p align="left"><em>Single</em> determines if a single indicator light should
1567 be created instead of two. If this is true, the unlit texture is specified
1568 in <em>UpLight</em>, and the <em>DownLight</em> value is ignored.</p>
1569 <p align="left"><em>Vertical</em> determines if the two lights should be vertically
1570 separated (true), or horizontally separated (false)</p>
1571 <p align="left"><em>BackTexture</em> is the texture of the wall plate behind
1573 <p align="left"><em>UpTexture</em> and <em>DownTexture</em> are the textures
1574 used for the lights themselves, and the "Lit" texures are the ones
1575 to show when the light is on. <em>DownTexture</em> is ignored if <em>Single</em>
1577 <p align="left"><em>CenterX</em> and <em>CenterZ</em> are the central location
1578 of the indicators</p>
1579 <p align="left"><em>voffset</em> is the altitude offset that the object is above
1581 <p align="left"><em>direction </em>determines the direction the indicators face:<br>
1582 'front' means they face towards the front of the building<br>
1583 'back' means they face towards the back of the building<br>
1584 'left' means they face left<br>
1585 'right' means they face right</p>
1586 <p align="left"><em>BackWidth</em> and <em>BackHeight</em> are the width and
1587 height of the wall plate</p>
1588 <p align="left"><em>ShowBack</em> determines if the wall plate should be shown,
1589 and is either true or false</p>
1590 <p align="left"><em>tw</em> and <em>th</em> are the texture scaling for the
1592 <p align="left"><strong>12. SetShaftDoors</strong> - sets positioning and thickness
1593 of shaft doors which will be created with the <em>AddShaftDoor</em> command<br>
1594 Syntax: <font size="2" face="Courier New, Courier, mono">SetShaftDoors<em>
1595 number</em>, <em>thickness, CenterX, CenterZ</em></font> </p>
1596 <p align="left">This command must be used before calling <em>AddShaftDoor</em>.
1597 This specifies the thickness and X/Z positioning for the shaft doors that
1598 will be created. <em>Number</em> specifies the door number this is associated
1599 with (use 1 if only one door).</p>
1600 <p align="left"><strong>13. AddFloorSigns</strong> - creates floor signs on
1601 all floors serviced by the elevator<br>
1602 Syntax: <font size="2" face="Courier New, Courier, mono">AddFloorSigns<em>
1603 door_number, relative, texture_prefix, direction, CenterX, CenterZ, width,
1604 height, voffset</em></font> </p>
1605 <p align="left">The AddFloorSigns command creates floor signs (similar to floor
1606 indicators) on all the floors serviced by the current elevator. Direction
1607 is the direction the signs face, and can be either "left", "right",
1608 "front" or "back". Texture_prefix is the base name of
1609 the texture to load when displaying a floor ID; for example if the sign is
1610 on floor 3, and you specify a prefix of "Button", it'll load the "Button3"
1611 texture. Door_number specifies the door number to check against, meaning if
1612 shaft doors don't exist on a certain floor for the specified door, the sign
1613 won't be created on that floor. This can be bypassed by setting door_number
1615 <p align="left"><strong>14. AddSound</strong> - creates a user-defined looping
1616 sound at the specified position<br>
1617 Syntax: <font size="2" face="Courier New, Courier, mono">AddSound <em>name,
1618 filename, x, y, z[, volume, speed, min_distance, max_distance, dir_radiation,
1619 direction_x, direction_y, direction_z]</em></font><br>
1620 Example 1: <font size="2" face="Courier New, Courier, mono">AddSound MySound,
1621 data/sound.wav, 10, 100, 5<br>
1622 </font>Example 2: <font size="2" face="Courier New, Courier, mono">AddSound
1623 MySound, data/sound.wav, 10, 100, 5, 1, 100, 1, -1, 0, 0, 0, 0</font></p>
1624 <p align="left">For information on the parameters, see the AddSound command
1625 in the Globals section. The only difference here is that the X, Y and Z position
1626 values are relative of the elevator's center/origin.</p>
1627 <p align="left"><strong>15. AddDoorComponent</strong> - creates a single elevator
1628 door component, used for creating custom door styles<br>
1629 Syntax: <font size="2" face="Courier New, Courier, mono">AddDoorComponent
1630 <em>number, name, texture, sidetexture, thickness, direction, speed, x1, z1,
1631 x2, z2, height, voffset, tw, th, side_tw, side_th</em></font></p>
1632 <p align="left">Example: <font size="2" face="Courier New, Courier, mono">AddDoorComponent
1633 1, Left, ElevDoors, Black, 0.2, left, 0.3, -1.75, 0, 0, 0, 8, 0, 0, 0, 0,
1635 <p align="left">The AddDoorComponent command allows you to create your own custom
1636 door styles. It creates a single door component within a set - for example,
1637 the standard center-open doors have 2 door components: left and right. With
1638 this command you specify the positioning of a component similar to wall creation,
1639 specify it's textures, tell it which direction it's going to travel during
1640 opening, and what it's speed will be. <em>Number</em> specifies the number
1641 of the door to create (related to the <em>Doors</em> command) - if the elevator
1642 only has one door, or if the Doors command was not used, specify 1 here. <em>Texture</em>
1643 refers to the texture used on the main (front and back) sides of the door.
1644 <em>SideTexture</em> refers to the texture used on the sides (and top/bottom)
1645 of the door. <em>Direction</em> is either Up, Down, Left (or Front; is the
1646 same), or Right (or Back; is also the same). <em>Side_tw</em> and <em>side_th</em>
1647 specify the texture tiling for the sides. Use the FinishDoors command after
1648 creating the components. The above example creates the left door component
1649 for the standard center-open doors, and uses the default speed value. This
1650 command replaces the AddDoors command.</p>
1651 <p align="left"><strong>16. AddShaftDoorsComponent</strong> - creates a single
1652 shaft door component for all serviced floors - used for creating custom door
1654 Syntax: <font size="2" face="Courier New, Courier, mono">AddShaftDoorsComponent
1655 <em>number, name, texture, sidetexture, thickness, direction, speed, x1, z1,
1656 x2, z2, height, voffset, tw, th, side_tw, side_th</em></font></p>
1657 <p align="left">This command is almost identical to the AddDoorComponent command,
1658 except that it creates shaft doors. Use the FinishShaftDoors command after
1659 creating the components. This command replaces the AddShaftDoors command. To create
1660 shaft doors on a per-floor basis, use the AddShaftDoorComponent command in the Floors section.</p>
1661 <p align="left"><strong>17. FinishDoors</strong> - finishes elevator door creation
1662 - use this after all related AddDoorComponent commands are used.<br>
1663 Syntax: <font size="2" face="Courier New, Courier, mono">FinishDoors <em>number</em></font></p>
1664 <p align="left">This command completes the elevator door creation by storing
1665 the central location and shift factor, cutting walls for the door, creating
1666 side connection pieces for the cut, etc.</p>
1667 <p align="left"><strong>18. FinishShaftDoors</strong> - finishes shaft door
1668 creation for all serviced floors - use this after all related AddShaftDoorsComponent
1669 commands are used, or specify it without the AddShaftDoorComponent commands
1670 if you're creating a manual shaft door.<br>
1671 Syntax: <font size="2" face="Courier New, Courier, mono">FinishShaftDoors
1672 <em>number</em></font></p>
1673 <p align="left">This command is almost identical to the FinishDoors command
1674 except that it's used for finishing shaft doors on all serviced floors.</p>
1675 <p align="left"> </p>
1676 <p align="left"><strong><font size="+1"><a name="Functions" id="Functions"></a>8. Predefined
1677 Functions</font></strong></p>
1678 <p align="left">There are a number of script functions provided by the simulator.
1679 Currently there's only a single script for elevator doors - see the Simple
1680 building (noted at the bottom of this page) for an example. These functions
1681 can be used by putting this line in your script:</p>
1682 <p align="left"><font size="2" face="Courier New, Courier, mono"><Include data/scripts/elevator_doors.txt></font></p>
1683 <p align="left">You'll then be able to use some predefined door functions:</p>
1684 <p align="left"><strong>1. elevdoor_single</strong> - creates a single-slide
1686 Syntax: <font size="2" face="Courier New, Courier, mono">elevdoor_single(<em>door_number,
1687 texture, side_texture, thickness, CenterX, CenterZ, width, height, door_direction,
1688 movement_direction, speed, is_shaft_door</em>)</font></p>
1689 <p align="left">Door_Direction is either "left", "right",
1690 "front" or "back" and is the direction the doors face
1691 (torwards the outside of the elevator). Movement_direction is the direction
1692 the door should move.</p>
1693 <p align="left"><strong>2. elevdoor_center</strong> - creates a center-open
1695 Syntax: <font size="2" face="Courier New, Courier, mono">elevdoor_center(<em>door_number,
1696 texture, side_texture, thickness, CenterX, CenterZ, width, height, door_direction,
1697 speed, is_shaft_door</em>)</font></p>
1698 <p align="left"><strong>3. elevdoor_center_classic</strong> - creates a center-open
1699 elevator door with a partially open interior door.<br>
1700 Syntax: <font size="2" face="Courier New, Courier, mono">elevdoor_center_classic(<em>door_number,
1701 texture, side_texture, thickness, CenterX, CenterZ, width, height, door_direction,
1702 speed, is_shaft_door</em>)</font></p>
1703 <p align="left"><strong>4. elevdoor_dualspeed_left</strong> - creates a dual-speed
1704 door that opens to the left<br>
1705 Syntax: <font size="2" face="Courier New, Courier, mono">elevdoor_dualspeed_left(<em>door_number,
1706 texture, side_texture, thickness, CenterX, CenterZ, width, height, door_direction,
1707 speed, is_shaft_door</em>)</font></p>
1708 <p align="left"><strong>5. </strong><strong>elevdoor_dualspeed_right</strong>
1709 - creates a dual-speed door that opens to the right<br>
1710 Syntax: <font size="2" face="Courier New, Courier, mono">elevdoor_dualspeed_right(<em>door_number,
1711 texture, side_texture, thickness, CenterX, CenterZ, width, height, door_direction,
1712 speed, is_shaft_door</em>)</font></p>
1713 <p align="left"><strong>6. </strong><strong>elevdoor_center_dualspeed</strong>
1714 - creates a dual-speed center-open door<br>
1715 Syntax: <font size="2" face="Courier New, Courier, mono">elevdoor_center_dualspeed(<em>door_number,
1716 texture, side_texture, thickness, CenterX, CenterZ, width, height, door_direction,
1717 speed, is_shaft_door</em>)</font></p>
1718 <p align="left"> </p>
1719 <p align="left"><strong><font size="+1"><a name="Example"></a>9. Small Example
1720 Building</font></strong></p>
1721 <p align="left">To see an example of a small simplistic building in code, look
1722 at the Simple.bld file in Skyscraper's buildings directory. It's also available
1723 online <a href="http://cvs.tliquest.net/viewvc/*checkout*/skyscraper/buildings/Simple.bld">here</a>.</p>
1724 <p align="left"> </p>