Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 17 and Version 18 of content/LevelHowTo


Ignore:
Timestamp:
Feb 11, 2011, 10:42:31 AM (13 years ago)
Author:
jo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • content/LevelHowTo

    v17 v18  
    5858
    5959== Basics ==
    60  * Worldentity Point in space with orientation ( ~point with a vector attached to it)
     60 * Worldentity: Point in space with orientation ( ~point with a vector attached to it).
    6161  * Static Entity: Worldentity with a fixed position and fixed orientation.
    6262  * Movable Entity: Worldentity that can rotate or move constantly.
     
    7777</StaticEntity>
    7878}}}
    79 The StaticEntity defines the model's place and orientation (and some other values). With the proper sized collisionshape attached to the model you have a "solid" cube. Without a collisionshape, the cube wouldn't be solid and your spaceship could just fly through it. This exampe is quite useful, since you usually can't see a collisionshape's size. If you combine a invisible collisionshape with a fitting model you can see where a collisionshape is.
     79The StaticEntity defines the model's place and orientation (and some other values). The Model (a cube) is attached to the StaticEntity. With the proper sized collisionshape attached to the StaticEntity you have a "solid" cube. Without a collisionshape, the cube wouldn't be solid and your spaceship could just fly through it. This exampe is quite useful, since you usually can't see a collisionshape's size. If you combine a invisible collisionshape with a fitting model you can see where a collisionshape is for testing purposes.
     80
     81== MovalbeEntity - Let's get the world moving==
     82Worldentities can be attached to other worldentities. If you want a model to move in circles, you can create a MovableEntity that rotates and a StaticEntity attached to it. The model that should be rotating is attached to the StaticEntity.
     83{{{
     84#!xml
     85<?lua
     86    dofile("includes/CuboidSpaceStation.lua")
     87  ?>
     88<!-- ----------------Rotating SpaceStation--------------- -->
     89<MovableEntity position="1,1,1" rotationrate="-4.5" rotationaxis="0,0,1">
     90    <attached>
     91        <StaticEntity position="-2500,0,0" yaw=90 pitch=90>
     92            <attached>
     93                <?lua
     94                  createSpaceStationPar(0,2,1,2,1,4,1,50)
     95                ?>
     96            </attached>
     97        </StaticEntity>
     98    </attached>
     99</MovableEntity>
     100}}}
     101Note that in this example there Model is created by a lua script that is called in a lua tag. Lua is a scripting language that is a very powerful tool for level design.
    80102
    81103== Spawpoints ==