Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2017, 4:06:54 PM (7 years ago)
Author:
vyang
Message:

TestLevel Design → immer noch mit Fehlermeldungen, Asteroiden in der death() Methode von AsteroidsStone spawnen oder im game?

Location:
code/branches/Asteroid_HS17/data/levels
Files:
1 added
2 edited

Legend:

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

    r11490 r11541  
    11 <LevelInfo
    2  name = "emptyLevel"
     2 name = "AsteroidsTest"
    33 description = "A level with absolutely nothing in it."
    44 tags = "test"
     
    1414
    1515<?lua
    16   include("templates/spaceshipEscort.oxt")
     16  include("templates/spaceship.oxt")
    1717  include("templates/endurancetest_template.oxt")
    1818?>
     
    3030
    3131    <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"/>
    32     <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
     32    <SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipAsteroids />
    3333
    34     <ModularSpaceShip velocity= "20,0,0" position="0,0,200" lookat= "0,0,0" health="1000" maxhealth="1000" initialhealth="1000">
    35       <templates>
    36         <Template link=endurance />
    37       </templates>
    38     </ModularSpaceShip>
    3934   
    4035  </Scene>
  • code/branches/Asteroid_HS17/data/levels/Asteroids.oxw

    r11528 r11541  
    22 name = "Asteroids"
    33 description = "Try to prevent asteroids from colliding into your spaceshuttle. Be prepared to dodge all asteroids or destroy them."
    4  tags = "asteroids, minigame"
     4 tags = "minigame"
    55 screenshot = "emptylevel.png"
    66/>
     
    1515  include("templates/spaceshipAssff2.oxt")
    1616  include("templates/spaceshipPirate.oxt")
    17   include("templates/spaceshipInvader.oxt")
    18   include("templates/enemyInvader.oxt")
     17  include("templates/spaceshipAsteroids.oxt")
    1918  include("overlays/InvaderHUD.oxo")
    2019?>
    2120
     21<Template name=asteroidsshipcamera defaults=0>
     22  <AsteroidsShip>
     23    <camerapositions>
     24      <CameraPosition position="55,75,200" absolute=true />
     25      <!--CameraPosition position="0,50,160" drag=true mouselook=true />
     26      <CameraPosition position="0,50,0" pitch=-90 drag=true mouselook=true /-->
     27    </camerapositions>
     28  </AsteroidsShip>
     29</Template>
     30
     31<Template name=asteroidsship>
     32  <AsteroidsShip camerapositiontemplate=asteroidsshipcamera>
     33  </AsteroidsShip>
     34</Template>
     35
    2236<Level
    23   plugins = invader
    24   gametype = Invader
     37  plugins = asteroids
     38  gametype = Asteroids
    2539>
    2640  <templates>
     
    3852    <!-- <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"/> -->
    3953    <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 />
     54    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=AsteroidsShip pawndesign=asteroidsship />
    4155
    4256    <DistanceTrigger name="start" position="-200,0,0" target="Pawn" distance=10 stayActive="true" delay=0 />
    4357
    4458
    45     <InvaderCenterPoint name=invadercenter />
     59    <AsteroidsCenterPoint name=asteroidscenter />
    4660   
    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     >
    61       <attached>
    62         <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
    63       </attached>
    64       <collisionShapes>
    65         <SphereCollisionShape radius="<?lua print(j * 350) ?>" />
    66       </collisionShapes>
    67     </MovableEntity>
    68 
    69     <?lua
    70       end
    71     ?>
    7261   
    7362  </Scene>
Note: See TracChangeset for help on using the changeset viewer.