Changeset 10065 for code/branches/ScriptableController/data
- Timestamp:
- May 21, 2014, 2:32:41 PM (10 years ago)
- Location:
- code/branches/ScriptableController/data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ScriptableController/data/gui/scripts/testscript.lua
r10057 r10065 1 --k = 1.2 1 -- Set some test variables 2 xm = 1000 3 ym = 0 4 zm = 0 2 5 3 --orxonox.execute("orxout message test " .. k) 6 xl = -1000 7 yl = 3000 8 zl = -1000 4 9 5 -- Set some test variables 6 x = 1.1 7 y = 2.2 8 z = 3.3 10 d = 5 11 Tabs = 0 9 12 10 --os.execute("sleep " .. 2) 13 pi = 3.1415 11 14 12 15 -- Get a local pointer to a scriptcontroller … … 15 18 -- If it worked, call its "movetoposition" function 16 19 if ctrl ~= nil then 17 ctrl:eventScheduler("moveToPosition_beta", x, y, z, 0.01) 20 -- Move to the starting point at (xl+3000,yl,zl) while looking 21 -- at xl,yl,zl over the time span of 3 seconds 22 ctrl:eventScheduler("mal", xl+3000,yl,zl, xl,yl,zl, 3, 0) 23 24 -- From there, perform a rotation around the harvester placed there 25 -- in 100 steps 26 dt = math.pi/100 27 for t = 0,math.pi,dt do 28 xt = math.cos(t) 29 yt = math.sin(t) 30 31 ctrl:eventScheduler("mal", xl+3000*xt, yl+3000*yt, zl, xl, yl, zl, 3*dt, 3*t+2.9) 32 end 33 34 -- Update absolute time 35 Tabs = 3*math.pi + 2.9 36 37 -- Move away again, still looking at the station 38 ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3, Tabs+0.4) 39 40 18 41 end 19 42 -
code/branches/ScriptableController/data/levels/levelTry.oxw
r10059 r10065 47 47 <SpawnPoint team=0 position="3200,0,0" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort /> 48 48 49 <!-- 49 50 <StaticEntity position = "2800,0,0" mass=10000 collisionType=static > 50 51 <attached> … … 52 53 </attached> 53 54 <collisionShapes> 54 <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" /> <!-- Three lower boxes -->55 <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" /> 55 56 <BoxCollisionShape position="290,0,-480" halfExtents="115,100,245" yaw=-120 /> 56 57 <BoxCollisionShape position="290,0,480" halfExtents="115,100,245" yaw=-240 /> 57 <BoxCollisionShape position="-280,0,0" halfExtents="163,50,50" /> <!-- Three lower connections -->58 <BoxCollisionShape position="-280,0,0" halfExtents="163,50,50" /> 58 59 <BoxCollisionShape position="140,0,-240" halfExtents="163,50,50" yaw=-120 /> 59 60 <BoxCollisionShape position="140,0,240" halfExtents="163,50,50" yaw=-240 /> 60 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" /> <!-- Upper Tower -->61 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" /> 61 62 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-120 /> 62 63 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-240 /> 63 <BoxCollisionShape position="0,400,0" halfExtents="43,110,26" yaw=-30 /> <!-- Middle one-->64 <BoxCollisionShape position="-200,100,0" halfExtents="26,50,43" /> <!--Three lower legs -->64 <BoxCollisionShape position="0,400,0" halfExtents="43,110,26" yaw=-30 /> 65 <BoxCollisionShape position="-200,100,0" halfExtents="26,50,43" /> 65 66 <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=-30 /> 66 67 <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=30 /> 67 <BoxCollisionShape position="-100,264,0" halfExtents="26,105,43" roll=-49 /> <!--Three upper legs -->68 <BoxCollisionShape position="-100,264,0" halfExtents="26,105,43" roll=-49 /> 68 69 <BoxCollisionShape position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 /> 69 70 <BoxCollisionShape position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 /> 70 71 </collisionShapes> 71 72 </StaticEntity> 73 --> 72 74 73 75 … … 77 79 /> 78 80 81 <StaticEntity position = "0,0,0" mass=10000 collisionType=static > 82 <attached> 83 <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=10 /> 84 </attached> 85 </StaticEntity> 86 87 <StaticEntity position = "-1000,3000,-1000" mass=10000 collisionType=static > 88 <attached> 89 <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=80 /> 90 </attached> 91 </StaticEntity> 79 92 80 93 <!-- ControllerDirector waits for the event takeControl to attach a new Controller --> … … 84 97 <EventListener event="takeControl" /> 85 98 </takeControl> 86 87 99 </events> 88 89 100 </ControllerDirector> 90 91 <!-- -->92 <ScriptController position="0,0,1">93 94 95 </ScriptController>96 97 101 98 102 <!-- FPS Player as destination of the dock -->
Note: See TracChangeset
for help on using the changeset viewer.