Changeset 10505
- Timestamp:
- May 28, 2015, 11:26:38 AM (10 years ago)
- Location:
- code/branches/presentationFS15
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationFS15/data/gui/scripts/presentation.lua
r10499 r10505 1 1 -- Set some test variables 2 x m = 10003 y m =04 z m =02 x0 = 0 3 y0 = 500 4 z0 = 500 5 5 6 x l = -10007 y l = 30008 z l = -10006 xo = 2000 7 yo = 0 8 zo = 0 9 9 10 x r = 200011 y r = 50012 z r = 200010 x1 = 3000 11 y1 = 0 12 z1 = 0 13 13 14 d = 5 15 Tabs = 0 16 17 pi = 3.1415 14 x2 = 2000 15 y2 = 2000 16 z2 = 0 18 17 19 18 -- Get a local pointer to a scriptcontroller … … 23 22 if ctrl ~= nil then 24 23 25 ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2)26 24 ctrl:eventScheduler("idle", 1) 27 ctrl:eventScheduler(" ral", xl, yl, zl, 3, 0, 0, math.pi)25 ctrl:eventScheduler("chl", x0, y0, z0, xo, yo, zo, 2) 28 26 ctrl:eventScheduler("idle", 1) 29 ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3) 27 ctrl:eventScheduler("mal", x2, y2, z2, xo, yo, zo, 2) 28 ctrl:eventScheduler("mal", x1, y1, z1, xo, yo, zo, 2) 30 29 ctrl:eventScheduler("idle", 1) 31 ctrl:eventScheduler(" chl", xl, yl, zl, xr, yr, zr, 2)30 ctrl:eventScheduler("ral", xo, yo, zo, 3, 1000, 0, 5) 32 31 ctrl:eventScheduler("idle", 1) 33 ctrl:eventScheduler(" mal", xr + 600,yr,zr, xr,yr,zr, 4)32 ctrl:eventScheduler("ral", xo, yo, zo, 2, 1000, 0, 5) 34 33 ctrl:eventScheduler("idle", 1) 35 ctrl:eventScheduler("chl", xr, yr, zr, xl, yl, zl, 3) 36 ctrl:eventScheduler("idle", 1) 37 ctrl:eventScheduler("spi", xm,ym,zm, 0,0,0, 4) 34 ctrl:eventScheduler("ral", xo, yo, zo, 1, 1000, 0, 5) 38 35 ctrl:eventScheduler("idle", 1) 39 36 -
code/branches/presentationFS15/data/gui/scripts/testscript.lua
r10499 r10505 25 25 ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2) 26 26 ctrl:eventScheduler("idle", 1) 27 ctrl:eventScheduler("ral", xl, yl, zl, 3, 0, 0, math.pi)27 ctrl:eventScheduler("ral", xl, yl, zl, 3, 3000, 0, math.pi) 28 28 ctrl:eventScheduler("idle", 1) 29 29 ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3) -
code/branches/presentationFS15/data/levels/presentationFS15.oxw
r10504 r10505 16 16 include("templates/spaceshipFS15.oxt") 17 17 include("templates/orbStation.oxt") 18 18 include("templates/spaceshipSwallow.oxt") 19 19 ?> 20 20 … … 33 33 <SpawnPoint team=0 position="-500,0,0" lookat="-1000,0,0" spawnclass=SpaceShip pawndesign=spaceshipfs15/> 34 34 35 <?lua for i=0,4,1 do ?> 36 <SpaceShip position="-3000,<?lua print(i*200)?>,0" lookat="-500,0,0" visible="true"> 37 <templates> 38 <Template link=spaceshipswallow /> 39 </templates> 40 </SpaceShip> 41 <?lua end ?> 42 43 35 44 <!-- Docking --> 36 <Dock position="- 1000,0,0" roll=0 yaw=0 >45 <Dock position="-2000,-1000,0" roll=0 yaw=0 > 37 46 <attached> 38 47 <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 /> … … 67 76 </SpaceShip> 68 77 69 <Billboard position="0,500,500" material="Flares/ringflare2" colour="0.8,0.4,0.2" scale=1 /> 70 <DistanceTrigger position="0,500,500" distance="200" target="Pawn" name="takeControl"/> 71 72 <MovableEntity position="0,1000,1000" > 78 <MovableEntity position="2000,0,0" > 73 79 <templates> 74 80 <Template link=orbStation/> … … 81 87 </MovableEntity> 82 88 83 <ControllerDirector position="0,0,0" scriptname="presentation"> 89 <Billboard position="0,500,500" material="Flares/ringflare2" colour="0.8,0.4,0.2" scale=1 /> 90 <DistanceTrigger position="0,500,500" distance="20" target="Pawn" name="takeControl"/> 91 92 <ControllerDirector position="0,500,500" scriptname="presentation"> 84 93 <events> 85 94 <takeControl> -
code/branches/presentationFS15/src/orxonox/controllers/ScriptController.cc
r10489 r10505 245 245 switch ((int) currentEvent.d) { 246 246 case 3: 247 a = new Vector3(this->currentEvent.v1.x + 3000*cos(2*M_PI*dl),248 this->currentEvent.v1.y + 3000*sin(2*M_PI*dl),247 a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e *cos(2*M_PI*dl), 248 this->currentEvent.v1.y + this->currentEvent.e*sin(2*M_PI*dl), 249 249 this->currentEvent.v1.z); 250 250 break; 251 251 case 2: 252 a = new Vector3(this->currentEvent.v1.x + 3000*cos(2*M_PI*dl),252 a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2*M_PI*dl), 253 253 this->currentEvent.v1.y, 254 this->currentEvent.v1.z + 3000*cos(2*M_PI*dl));254 this->currentEvent.v1.z + this->currentEvent.e*cos(2*M_PI*dl)); 255 255 break; 256 256 case 1: 257 257 a = new Vector3(this->currentEvent.v1.x, 258 this->currentEvent.v1.y + 3000*sin(2*M_PI*dl),259 this->currentEvent.v1.z + 3000*cos(2*M_PI*dl));258 this->currentEvent.v1.y + this->currentEvent.e*sin(2*M_PI*dl), 259 this->currentEvent.v1.z + this->currentEvent.e*cos(2*M_PI*dl)); 260 260 break; 261 261 }
Note: See TracChangeset
for help on using the changeset viewer.