[Orxonox-commit 6202] r10860 - code/branches/planetLevelHS15/data/levels
luhug at orxonox.net
luhug at orxonox.net
Wed Nov 25 20:34:39 CET 2015
Author: luhug
Date: 2015-11-25 20:34:39 +0100 (Wed, 25 Nov 2015)
New Revision: 10860
Modified:
code/branches/planetLevelHS15/data/levels/luaTest.oxw
Log:
updated luaTest.oxw
Modified: code/branches/planetLevelHS15/data/levels/luaTest.oxw
===================================================================
--- code/branches/planetLevelHS15/data/levels/luaTest.oxw 2015-11-25 17:46:20 UTC (rev 10859)
+++ code/branches/planetLevelHS15/data/levels/luaTest.oxw 2015-11-25 19:34:39 UTC (rev 10860)
@@ -21,20 +21,20 @@
<!-- randomly generate houses -->
<?lua
- function randomHouses(x,y,cellSize)
+function randomHouses(x,y,cellSize)
returnString = ""
for currentX = 1, x, 1 do
for currentY = 1, y, 1 do
- houseNr = math.floor(math.random()*4)
+ houseNr = math.floor(math.random()*4 + 1)
orientation = math.floor(math.random()*4)
- houses = {"PrimeTower","Glasstower1","ETH","Hausc1","haus5","haus1"}
- houseString = houses[houseNr]
-
- returnString = returnString .. "<StaticEntity position=\"" .. (currentX - (cellSize/2)) .. "," .. (currentX - (cellSize/2)) .. "," .. (houseHeight/2) .. "\" direction=\"0,0,1\" pitch=\"0\" roll=\"0\" yaw=\"" .. (orientation*90) .. "\"> <attached> <Model position=\"0,0,0\" mesh=\"" .. houseString .. ".mesh\" scale3D=\"100\"/></attached></StaticEntity>\n\n"
+ houses = {"Glasstower1","ETH","Hausc1","PrimeTower"}
+ scales = {100,100,100,7}
+ collisionShapes = {"","","<BoxCollisionShape position=\"0,0,+50\" halfExtents=\"100, 100, 50\" /><BoxCollisionShape position=\"-50,50,200\" halfExtents=\"50, 50, 100\" scale=\"1.4286\"/><BoxCollisionShape position=\"50,0,300\" halfExtents=\"50, 100, 200\" scale=\"1.4286\"/><BoxCollisionShape position=\"50,50,600\" halfExtents=\"50, 50, 100\" scale=\"1.4286\"/><BoxCollisionShape position=\"-25,-25,150\" halfExtents=\"25, 25, 50\" scale=\"1.4286\"/><BoxCollisionShape position=\"-25,+75,350\" halfExtents=\"25, 25, 50\" scale=\"1.4286\"/><BoxCollisionShape position=\"75,-25,550\" halfExtents=\"25, 25, 50\" scale=\"1.4286\"/>","",""}
+ returnString = returnString .. "<StaticEntity collisionType=\"static\" position=\"" .. (currentX*cellSize - (cellSize/2)) .. "," .. (currentY*cellSize - (cellSize/2)) .. ",0\" direction=\"0,1,0\" pitch=\"0\" roll=\"0\" yaw=\"" .. (orientation*90) .. "\"> <attached> <Model position=\"0,0,0\" mesh=\"" .. houses[houseNr] .. ".mesh\" scale=\"" .. scales[houseNr] .. "\"/></attached><collisionShapes>" .. collisionShapes[houseNr] .. "</collisionShapes></StaticEntity>\n\n"
end
end
return returnString
- end
+end
?>
@@ -49,11 +49,16 @@
skybox = "Orxonox/Starbox"
>
- <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"/>
- <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+ <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort direction="0,1,0" />
- <?lua print(randomHouses(5,5,500)) ?>
-
- </Scene>
+ <?lua print(randomHouses(2,2,1000)) ?>
+ <StaticEntity position="0,0,0" direction="0,0,0" collisionType=static mass=0 friction=0.01 yaw=90 roll=90 >
+ <attached>
+ <Model position="0,0,0" mesh="skyboxHoenggerberg.mesh" scale3D="1000000,1000000,1000000" lodLevel="0"/>
+ <--!<PortalEndPoint position="0,0,0" id="1" distance="40" target="Pawn" design="PortalDefault"/>-->
+ <Light type="point" position="0,0,0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+ </attached>
+</StaticEntity> </Scene>
</Level>
More information about the Orxonox-commit
mailing list