Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2008, 4:49:31 PM (17 years ago)
Author:
dafrick
Message:

Improved spacestations randomness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/media/levels/CuboidSpaceStation.lua

    r5333 r5341  
    1313
    1414-- This function creates a randomly generated space station.
    15 -- 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,
     15-- The first argument ranSeed, must be 0, or a positive Integer, if it is 0 your space station is always chosen randomly, if you give an integer,
    1616--      your space station will be generated randomly, but once you have the space station it will always be the same.
    1717-- The argument xLength defines how large the space station will be into the x-direction.
     
    3636----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    3737-- Create a randomseed, so that the math.random() function is actually random.
    38 if ranSeed == false then
     38if ranSeed == 0 then
    3939        math.randomseed(os.time())
     40        math.random()
    4041else
    4142        math.randomseed(ranSeed)
     43        math.random()
    4244end
    4345-- End create randomseed.
     
    667669-- This function is for the lazy guys, which do not care how the space station looks like, so I use some good standard values.
    668670function createSpaceStation()
    669         createSpaceStationPar(false,4,1,2,1,6,1,100)
     671        createSpaceStationPar(0,4,1,2,1,6,1,100)
    670672end
    671673-- End createSpaceStaion() function.
Note: See TracChangeset for help on using the changeset viewer.