Name: | shapeAdd |
Description: | Creates one of several available shapes. |
Syntax: | shapeAdd(<tPos>, <tDst>, {<sLay>, <fA>, <fB>, ...}, <tRot>) |
Arguments: | <tPos>: | a table containing the shape's center coordinates. |
| <tDst>: | the distribution table used to populate the shape. |
| <tPar>: | a table containing the following six parameters: <sLay>, <fA>, <fB>, <fC>, <fD> and <fE>. The last five vary depending on <sLay>. |
| <sLay>: | the type of shape to generate. (string) |
| If <sLay> is "Cylinder": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Cone": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Ellipsoid": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Cuboid": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Toroid": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the width of the tube. |
| <fD>: | equals the thickness. |
| <fE>: | equals the height of the tube. |
| If <sLay> is "Helicoid": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the width. (Thickness is not supported in this case.) |
| <fE>: | is the number of revolutions. |
| If <sLay> is "Paraboloid": |
| <fA>: | equals the length of axis 1 at a height of 1000 units. |
| <fB>: | equals the length of axis 2 at a height of 1000 units. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Hyperboloid": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Astroid": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Funnel": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals roughly the inverse of the length of axis 3 for large numbers of objects. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Dini": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the distance between each twist. |
| <fD>: | is always zero. |
| <fE>: | is the number of twists. |
| If <sLay> is "Corkscrew": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the height of the screw. |
| <fD>: | is always zero. |
| <fE>: | is always zero. |
| If <sLay> is "Seashell": |
| <fA>: | equals the length of axis 1 of the tube. |
| <fB>: | equals the length of axis 2 of the tube. |
| <fC>: | equals the vertical separation between revolutions. |
| <fD>: | equals the radius of the center gap. |
| <fE>: | equals the number of revolutions. |
| If <sLay> is "SineDisc": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the maximum height of the wave. |
| <fD>: | is always zero. |
| <fE>: | equals the frequency of the wave pattern. |
| If <sLay> is "SinePlane": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the maximum height of the wave. |
| <fD>: | is always zero. |
| <fE>: | equals the frequency of the wave pattern. |
| If <sLay> is "Moebius": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals half the width of the strip. |
| <fD>: | is always zero. |
| <fE>: | is always zero. |
| If <sLay> is "Klein": |
| <fA>: | equals the scaling along the x-axis. |
| <fB>: | equals the scaling along the z-axis. |
| <fC>: | equals the scaling along the y-axis. |
| <fD>: | is always zero. |
| <fE>: | is always zero. |
| If <sLay> is "Klein8": |
| <fA>: | equals the scaling along the x-axis. |
| <fB>: | equals the scaling along the z-axis. |
| <fC>: | equals the scaling along the y-axis. |
| <fD>: | is always zero. |
| <fE>: | is always zero. |
| If <sLay> is "Boy": |
| <fA>: | equals the scaling along the x-axis. |
| <fB>: | equals the scaling along the z-axis. |
| <fC>: | equals the scaling along the y-axis. |
| <fD>: | is always zero. |
| <fE>: | is an integer greater than 2. |
| If <sLay> is "Lissajous3D": |
| <fA>: | equals the length of the bounding cube. |
| <fB>: | equals the radius of the sphere sweep. |
| <fD>: | equals the speed of the second arc relative to the first. |
| <fD>: | equals the speed of the third arc relative to the first. |
| <fE>: | equals the number of revolutions. |
| If <sLay> is "Rectangle": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Ellipse": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the length of axis 3. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Parabola": |
| <fA>: | equals the distance between the vertex and the focus. |
| <fB>: | equals the length. |
| <fC>: | equals the height. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Hyperbola": |
| <fA>: | equals the length of axis 1. |
| <fB>: | equals the length of axis 2. |
| <fC>: | equals the distance from the origin to one of the foci. |
| <fD>: | equals the thickness. |
| <fE>: | is always zero. |
| If <sLay> is "Hypotrochoid": |
| <fA>: | equals the radius of the greater circle. |
| <fB>: | equals the radius of the lesser circle. |
| <fC>: | equals the radius of the sphere sweep. |
| <fD>: | equals the distance from the center of the lesser circle. |
| <fE>: | equals the number of revolutions. |
| If <sLay> is "Epitrochoid": |
| <fA>: | equals the radius of the greater circle. |
| <fB>: | equals the radius of the lesser circle. |
| <fC>: | equals the radius of the sphere sweep. |
| <fD>: | equals the distance from the center of the lesser circle. |
| <fE>: | equals the number of revolutions. |
| If <sLay> is "Lissajous2D": |
| <fA>: | equals the length of the bounding square. |
| <fB>: | equals the phase shift. |
| <fC>: | equals the radius of the sphere sweep. |
| <fD>: | equals the speed of the second arc relative to the first. |
| <fE>: | equals the number of revolutions. |
| <tRot>: | a table containing the X, Y and Z Euler rotation angles, in degrees, for the entire object. |
Name: | branchAdd |
Description: | Creates a branching tree. |
Syntax: | branchAdd(<tPos>, <tDst>, {<tDiv>, <tInt>, <tFrq>, <tBeg>, <tEnd>, <tRad>, <tLen>, <tThk>, <tAng>, <iMod>,}, <tRot>, ...) |
Arguments: | <tPos>: | a table containing the shape's center coordinates. |
| <tDst>: | the distribution table used to populate the shape. |
| <tPar>: | a table containing the following ten parameters: |
| <tDiv>: | a table containing the minimum and maximum number of new shoots that are generated each time the tree divides. |
| <tInt>: | a table containing the minimum and maximum number of segments between instances of division. |
| <tFrq>: | a table containing the minimum and maximum number of times the tree divides. |
| <tBeg>: | a table containing the minimum and maximum number of segments added to the beginning of the tree. |
| <tEnd>: | a table containing the minimum and maximum number of segments added to the end of the tree (at the end of each branch). (Note: this value needs to be greater than zero in order for the last division to be noticable.) |
| <tRad>: | a table containing the the minimum and maximum radius of a segment. |
| <tLen>: | a table containing the minimum and maximum length of a segment. |
| <tThk>: | a table containing the minimum and maximum thickness, as percentages of the radius, of a segment. |
| <tAng>: | a table containing the minimum and maximum angle of deviation between segments. |
| <iMod>: | 0 is non-random mode, 1 is random placement with steadily decreasing length and radius, 2 is random placement with random length and radius, 3 is a bug-ridden method using splines. |
| <tRot>: | a table containing the X, Y and Z rotation angles (degrees) for the entire object. |
| The remaining arguments are used internally by the function and should not be modified. |
Name: | spiralAdd |
Description: | Creates a spiral. |
Suntax: | spiralAdd(<tPos>, <tDst>, {<sLay>, <nRad>, <nArm>, <nRot>, <nAng>, <nHgh>, <nWid>, <nThk>, <tTim>, <iMod>,}, <tRot>) |
Arguments: | <tPos>: | a table containing the shape's center coordinates. |
| <tDst>: | the distribution table used to populate the shape. |
| <tPar>: | a table containing the following ten parameters: |
| <sLay>: | may be either "Nautilus" or "Archimedes". |
| <fRad>: | depending on <fAng>, this is either the minimum or maximum radius of the spiral. |
| <iArm>: | the number of arms the spiral will have. |
| <fRot>: | the number of times the spiral will rotate around the origin. |
| <fAng>: | the angle (degrees) of deviation (90' and 270' makes a circle). |
| <fHgh>: | the height of the spiral above the plane. |
| <fWid>: | the width of the spiral arms. |
| <fThk>: | the thickness of the spiral arms. |
| <tTim>: | a table containing the minimum and maximum values for "t" (time, percent) at which the curve is sampled. (must be a float between 0 and 1) |
| <iMod>: | 0 is non-random, 1 is random, 2 is random-mode with tapering width. |
| <tRot>: | a table containing the X, Y and Z rotation angles (degrees) for the entire object. |
Name: | randomMusic |
Description: | Randomly selects the level music. |
Syntax: | randomMusic(<iMod>, <tTab>, <iLen>, <sDir>) |
Arguments: | <iMod>: | may be 0, 1, 2, 3, 4 or 5. |
| If <iMod> is 0, then this function is disabled. |
| If <iMod> is 1, then the level music is selected from only the ambient tracks. |
| If <iMod> is 2, then the level music is selected from only the battle tracks. |
| If <iMod> is 3, then the level music is selected from both the ambient and battle tracks. |
| If <iMod> is 4, then the level music is selected from only <tTab>. |
| If <iMod> is 5, then the level music is selected from all of the above. |
| <tTab>: | a table containing the names of the custom audio tracks. (table, optional) |
| <iLen>: | the length of <tTab>. (number, optional) |
| <sDir>: | the directory where the extra files can be found. Must have a trailing slash. (string, optional) |
Note: | This function must be called from within the "NonDetermChunk" portion of a ".level" file. |