Changeset 5310 for data/media/levels/CuboidSpaceStation2.3.lua
- Timestamp:
- Dec 5, 2008, 10:08:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/media/levels/CuboidSpaceStation2.3.lua
r5309 r5310 6 6 -- The first argument ranSeed, must be false, or a positive Integer, if it is false your space station is always chosen randomly, if you give an integer, 7 7 -- your space station will be generated randomly, but once you have the space station it will be the same. 8 function createSpaceStation(ranSeed) 8 -- The argument xLen defines how large the space station will be into the x-direction. 9 -- The argument xVar defines how much the space station will vary at the ends in x-direction, this is so that the station is no cube. 10 -- The argument yLen is the same as xLen, but for the y-direction. 11 -- The argument yVar is the same as xLen, but for the y-direction. 12 -- The argument zLen is the same as xLen, but for the z-direction. 13 -- The argument zVar is the same as xLen, but for the z-direction. 14 -- The argument givenScale scales the station proportionally in all directions. 15 function createSpaceStationPar(ranSeed, xLen, xVar, yLen, yVar, zLen, zVar, givenScale) 9 16 10 17 … … 12 19 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 13 20 -- This prints xml code, which creates a MovableEntity, which I need to attach all the parts of the space station. 14 print("<MovableEntity scale=1 position=\"0,0,0\" velocity=\"0,0,0\" rotationaxis=\"0,0,0\" rotationrate=0>")21 print("<MovableEntity scale=1 position=\"0,0,0\" >") 15 22 -- End create Movable Entity. 16 23 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- … … 35 42 -- Define the maximal size of the space station, this is actually just for the grid, be sure that this value is big enough. 36 43 sSSize=30 44 45 --if xLen>=yLen and xLen>=zLen then 46 -- sSSize=xLen+20 47 --elseif yLen>=xLen and yLen>=zLen then 48 -- sSSize=yLen+20 49 --elseif zLen>=xLen and zLen>=yLen then 50 -- sSSize=zLen+20 51 --end 52 37 53 -- Define how many parts the space station has, this value has to be exact, so be sure to increment it if you're adding a new part. 38 54 sSParts=9 … … 50 66 pDim=6 51 67 -- Define the length in x-direction of the space station which will be occupied by bodyparts. 52 xBPLength= 468 xBPLength=xLen 53 69 -- Define the variation of the edges of your bodyparts in the x-direction. 54 xBPVar= 170 xBPVar=xVar 55 71 -- Define the length in y-direction of the space station which will be occupied by bodyparts. 56 yBPLength= 272 yBPLength=yLen 57 73 -- Define the variation of the edges of your bodyparts in the y-direction. 58 yBPVar= 174 yBPVar=yVar 59 75 -- Define the length in the z-direction of the space station which will be occupied by bodyparts. 60 zBPLength= 676 zBPLength=zLen 61 77 -- Define the variation of the edges of your bodyparts in the z-direction. 62 zBPVar= 178 zBPVar=zVar 63 79 -- Define the scale of the space station. 64 sSScale= 10080 sSScale=givenScale 65 81 -- Define the griddimension, be sure this value matches the size of a single space station part plus the size of a connection part, which means your parts must be: 66 82 -- integer*(gridDim-connectionSize), then integer tells you how many griddimensions your part is. … … 748 764 749 765 750 766 -- This function is for the lazy guys, which do not care how the space station looks like, so I use some good standard values. 767 function createSpaceStation() 768 createSpaceStationPar(false,4,1,2,1,6,1,100) 769 end 770
Note: See TracChangeset
for help on using the changeset viewer.