Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 4, 2017, 5:04:59 PM (7 years ago)
Author:
vyang
Message:

Spawn Funktion fuer die Asteroiden veraendert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Asteroid_HS17/data/levels/Asteroids.oxw

    r11516 r11528  
    1  <LevelInfo
     1<LevelInfo
    22 name = "Asteroids"
    3  description = "Try to prevent asteroids from colliding into your spaceshuttle. Be prepared to dodge all asteroids or destroy them;"
     3 description = "Try to prevent asteroids from colliding into your spaceshuttle. Be prepared to dodge all asteroids or destroy them."
    44 tags = "asteroids, minigame"
    55 screenshot = "emptylevel.png"
    66/>
     7
    78
    89<?lua
     
    1415  include("templates/spaceshipAssff2.oxt")
    1516  include("templates/spaceshipPirate.oxt")
    16   include("templates/spaceshipDodgeRace.oxt")
     17  include("templates/spaceshipInvader.oxt")
    1718  include("templates/enemyInvader.oxt")
    18   include("templates/DodgeRacePattern.oxt")
    19   include("overlays/DodgeRaceHUD.oxo")
     19  include("overlays/InvaderHUD.oxo")
    2020?>
    2121
    22 
    23 
    2422<Level
    25     plugin = asteroids
    26     gametype = Asteroids
    27     >
    28 
    29 
     23  plugins = invader
     24  gametype = Invader
     25>
    3026  <templates>
    3127    <Template link=lodtemplate_default />
     
    3329  <?lua include("includes/notifications.oxi") ?>
    3430
     31    <!-- ambientlight = "0.8, 0.8, 0.8"
     32    skybox       = "Orxonox/Starbox" -->
    3533  <Scene
    36     ambientlight = "1.0, 1.0, 1.0"
    37     skybox       = "Orxonox/skyBoxClouds"
    38     negativeWorldRange = "-100000, -100000, -100000"
    39     positiveWorldRange = " 100000,  100000,  100000"
     34    ambientlight = "0.8, 0.7, 0.4"
     35    skybox     = "Orxonox/skyBoxBasic"
    4036  >
    4137
    42   <WorldAmbientSound
    43     source="Earth.ogg"
    44     looping="true"
    45     playOnLoad="true"
    46   />
    47 
    4838    <!-- <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> -->
    49     <Light type=directional position="-100, 10000, -700" lookat="0.2, -1, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
    50     <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=AsteroidsShip pawndesign=spaceshipdodgerace />
     39    <Light type=directional position="1100, 11000, -7000" lookat="0, 0, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
     40    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=InvaderShip pawndesign=spaceshipinvader />
    5141
    5242    <DistanceTrigger name="start" position="-200,0,0" target="Pawn" distance=10 stayActive="true" delay=0 />
    5343
    5444
    55     <DodgeRaceCenterPoint name=invadercenter />
    56  
    57   <StaticEntity position="0,-50,0" direction="0,0,0"   scale="1" collisionType=static mass=1 friction=0.01 >
     45    <InvaderCenterPoint name=invadercenter />
     46   
     47    <?lua
     48      for i = 1, 300, 1 do
     49        j = math.random()
     50    ?>
     51
     52    <MovableEntity
     53      position = "<?lua print(math.random()* 40000 + 1000) ?>,-1000,<?lua print(math.random() * 4000 - 2000) ?>"
     54      collisionType = dynamic
     55      linearDamping = 0.8
     56      angularDamping = 0
     57      scale = "<?lua print(j * 150)?>"
     58      collisiondamage = 0
     59      enablecollisiondamage = true
     60    >
    5861      <attached>
    59         <Model position="0,0,0" mesh="plane.mesh" scale3D="100000,0,100000" />
     62        <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
    6063      </attached>
     64      <collisionShapes>
     65        <SphereCollisionShape radius="<?lua print(j * 350) ?>" />
     66      </collisionShapes>
     67    </MovableEntity>
    6168
    62       <collisionShapes>
    63         <BoxCollisionShape position="0,0,0" halfExtents="1,1,1" />
    64       </collisionShapes>
    65 
    66   </StaticEntity>
    67    
    68    
    69    
    70    
    71    
     69    <?lua
     70      end
     71    ?>
    7272   
    7373  </Scene>
Note: See TracChangeset for help on using the changeset viewer.