Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5341


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

Improved spacestations randomness.

Location:
data/media/levels
Files:
3 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.
  • data/media/levels/CuboidSpaceStation.oxw

    r5333 r5341  
    8383                                <?lua
    8484                                        -- Here I use the createSpaceStationPar(...) function, which has 8 arguments, see the .lua file at the top to understand them.
    85                                         createSpaceStationPar(false,2,1,2,1,2,1,50)
     85                                        createSpaceStationPar(0,2,1,2,1,2,1,50)
    8686                                ?>
    8787                        </attached>
  • data/media/levels/princessaeryn.oxw

    r5339 r5341  
    183183                <attached>
    184184                    <?lua
    185                         createSpaceStationPar(200,2,1,2,1,2,1,100)
     185                        createSpaceStationPar(400,2,1,2,1,2,1,100)
    186186                    ?>
    187187                    <QuestEffectBeacon position="-200,250,500" times=1>
     
    206206                <attached>
    207207                    <?lua
    208                         createSpaceStationPar(200,2,1,2,1,2,1,100)
     208                        createSpaceStationPar(600,2,1,2,1,2,1,100)
    209209                    ?>
    210210                    <QuestEffectBeacon position="0,450,0" times=1>
Note: See TracChangeset for help on using the changeset viewer.