[Orxonox-commit 5845] r10505 - in code/branches/presentationFS15: data/gui/scripts data/levels src/orxonox/controllers
maxima at orxonox.net
maxima at orxonox.net
Thu May 28 11:26:38 CEST 2015
Author: maxima
Date: 2015-05-28 11:26:38 +0200 (Thu, 28 May 2015)
New Revision: 10505
Modified:
code/branches/presentationFS15/data/gui/scripts/presentation.lua
code/branches/presentationFS15/data/gui/scripts/testscript.lua
code/branches/presentationFS15/data/levels/presentationFS15.oxw
code/branches/presentationFS15/src/orxonox/controllers/ScriptController.cc
Log:
changed the presentation level and script
Modified: code/branches/presentationFS15/data/gui/scripts/presentation.lua
===================================================================
--- code/branches/presentationFS15/data/gui/scripts/presentation.lua 2015-05-28 08:41:23 UTC (rev 10504)
+++ code/branches/presentationFS15/data/gui/scripts/presentation.lua 2015-05-28 09:26:38 UTC (rev 10505)
@@ -1,40 +1,37 @@
-- Set some test variables
-xm = 1000
-ym = 0
-zm = 0
+x0 = 0
+y0 = 500
+z0 = 500
-xl = -1000
-yl = 3000
-zl = -1000
+xo = 2000
+yo = 0
+zo = 0
-xr = 2000
-yr = 500
-zr = 2000
+x1 = 3000
+y1 = 0
+z1 = 0
-d = 5
-Tabs = 0
+x2 = 2000
+y2 = 2000
+z2 = 0
-pi = 3.1415
-
-- Get a local pointer to a scriptcontroller
local ctrl = orxonox.ScriptController:getScriptController()
-- If it worked, call its "movetoposition" function
if ctrl ~= nil then
- ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2)
ctrl:eventScheduler("idle", 1)
- ctrl:eventScheduler("ral", xl, yl, zl, 3, 0, 0, math.pi)
+ ctrl:eventScheduler("chl", x0, y0, z0, xo, yo, zo, 2)
ctrl:eventScheduler("idle", 1)
- ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3)
+ ctrl:eventScheduler("mal", x2, y2, z2, xo, yo, zo, 2)
+ ctrl:eventScheduler("mal", x1, y1, z1, xo, yo, zo, 2)
ctrl:eventScheduler("idle", 1)
- ctrl:eventScheduler("chl", xl, yl, zl, xr, yr, zr, 2)
+ ctrl:eventScheduler("ral", xo, yo, zo, 3, 1000, 0, 5)
ctrl:eventScheduler("idle", 1)
- ctrl:eventScheduler("mal", xr + 600,yr,zr, xr,yr,zr, 4)
+ ctrl:eventScheduler("ral", xo, yo, zo, 2, 1000, 0, 5)
ctrl:eventScheduler("idle", 1)
- ctrl:eventScheduler("chl", xr, yr, zr, xl, yl, zl, 3)
+ ctrl:eventScheduler("ral", xo, yo, zo, 1, 1000, 0, 5)
ctrl:eventScheduler("idle", 1)
- ctrl:eventScheduler("spi", xm,ym,zm, 0,0,0, 4)
- ctrl:eventScheduler("idle", 1)
end
\ No newline at end of file
Modified: code/branches/presentationFS15/data/gui/scripts/testscript.lua
===================================================================
--- code/branches/presentationFS15/data/gui/scripts/testscript.lua 2015-05-28 08:41:23 UTC (rev 10504)
+++ code/branches/presentationFS15/data/gui/scripts/testscript.lua 2015-05-28 09:26:38 UTC (rev 10505)
@@ -24,7 +24,7 @@
ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2)
ctrl:eventScheduler("idle", 1)
- ctrl:eventScheduler("ral", xl, yl, zl, 3, 0, 0, math.pi)
+ ctrl:eventScheduler("ral", xl, yl, zl, 3, 3000, 0, math.pi)
ctrl:eventScheduler("idle", 1)
ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3)
ctrl:eventScheduler("idle", 1)
Modified: code/branches/presentationFS15/data/levels/presentationFS15.oxw
===================================================================
--- code/branches/presentationFS15/data/levels/presentationFS15.oxw 2015-05-28 08:41:23 UTC (rev 10504)
+++ code/branches/presentationFS15/data/levels/presentationFS15.oxw 2015-05-28 09:26:38 UTC (rev 10505)
@@ -15,7 +15,7 @@
include("templates/spaceshipRing.oxt")
include("templates/spaceshipFS15.oxt")
include("templates/orbStation.oxt")
-
+ include("templates/spaceshipSwallow.oxt")
?>
<Level>
@@ -32,8 +32,17 @@
<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="-500,0,0" lookat="-1000,0,0" spawnclass=SpaceShip pawndesign=spaceshipfs15/>
+ <?lua for i=0,4,1 do ?>
+ <SpaceShip position="-3000,<?lua print(i*200)?>,0" lookat="-500,0,0" visible="true">
+ <templates>
+ <Template link=spaceshipswallow />
+ </templates>
+ </SpaceShip>
+ <?lua end ?>
+
+
<!-- Docking -->
- <Dock position="-1000,0,0" roll=0 yaw=0 >
+ <Dock position="-2000,-1000,0" roll=0 yaw=0 >
<attached>
<Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
<DistanceTrigger position="0,0,0" distance="200" target="Pawn" beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"/>
@@ -66,10 +75,7 @@
</events>
</SpaceShip>
- <Billboard position="0,500,500" material="Flares/ringflare2" colour="0.8,0.4,0.2" scale=1 />
- <DistanceTrigger position="0,500,500" distance="200" target="Pawn" name="takeControl"/>
-
- <MovableEntity position="0,1000,1000" >
+ <MovableEntity position="2000,0,0" >
<templates>
<Template link=orbStation/>
</templates>
@@ -80,7 +86,10 @@
</events>
</MovableEntity>
- <ControllerDirector position="0,0,0" scriptname="presentation">
+ <Billboard position="0,500,500" material="Flares/ringflare2" colour="0.8,0.4,0.2" scale=1 />
+ <DistanceTrigger position="0,500,500" distance="20" target="Pawn" name="takeControl"/>
+
+ <ControllerDirector position="0,500,500" scriptname="presentation">
<events>
<takeControl>
<EventListener event="takeControl" />
Modified: code/branches/presentationFS15/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/branches/presentationFS15/src/orxonox/controllers/ScriptController.cc 2015-05-28 08:41:23 UTC (rev 10504)
+++ code/branches/presentationFS15/src/orxonox/controllers/ScriptController.cc 2015-05-28 09:26:38 UTC (rev 10505)
@@ -244,19 +244,19 @@
Vector3* a;
switch ((int) currentEvent.d) {
case 3:
- a = new Vector3(this->currentEvent.v1.x + 3000*cos(2*M_PI*dl),
- this->currentEvent.v1.y + 3000*sin(2*M_PI*dl),
+ a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e *cos(2*M_PI*dl),
+ this->currentEvent.v1.y + this->currentEvent.e*sin(2*M_PI*dl),
this->currentEvent.v1.z);
break;
case 2:
- a = new Vector3(this->currentEvent.v1.x + 3000*cos(2*M_PI*dl),
+ a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2*M_PI*dl),
this->currentEvent.v1.y,
- this->currentEvent.v1.z + 3000*cos(2*M_PI*dl));
+ this->currentEvent.v1.z + this->currentEvent.e*cos(2*M_PI*dl));
break;
case 1:
a = new Vector3(this->currentEvent.v1.x,
- this->currentEvent.v1.y + 3000*sin(2*M_PI*dl),
- this->currentEvent.v1.z + 3000*cos(2*M_PI*dl));
+ this->currentEvent.v1.y + this->currentEvent.e*sin(2*M_PI*dl),
+ this->currentEvent.v1.z + this->currentEvent.e*cos(2*M_PI*dl));
break;
}
More information about the Orxonox-commit
mailing list