Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2015, 11:26:38 AM (9 years ago)
Author:
maxima
Message:

changed the presentation level and script

Location:
code/branches/presentationFS15
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationFS15/data/gui/scripts/presentation.lua

    r10499 r10505  
    11-- Set some test variables
    2 xm = 1000
    3 ym = 0
    4 zm = 0
     2x0 = 0
     3y0 = 500
     4z0 = 500
    55
    6 xl = -1000
    7 yl = 3000
    8 zl = -1000
     6xo = 2000
     7yo = 0
     8zo = 0
    99
    10 xr = 2000
    11 yr = 500
    12 zr = 2000
     10x1 = 3000
     11y1 = 0
     12z1 = 0
    1313
    14 d = 5
    15 Tabs = 0
    16 
    17 pi = 3.1415
     14x2 = 2000
     15y2 = 2000
     16z2 = 0
    1817
    1918-- Get a local pointer to a scriptcontroller
     
    2322if ctrl ~= nil then
    2423
    25   ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2)
    2624  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)
    2826  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)
    3029  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)
    3231  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)
    3433  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)
    3835  ctrl:eventScheduler("idle", 1)
    3936
  • code/branches/presentationFS15/data/gui/scripts/testscript.lua

    r10499 r10505  
    2525  ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2)
    2626  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)
    2828  ctrl:eventScheduler("idle", 1)
    2929  ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3)
  • code/branches/presentationFS15/data/levels/presentationFS15.oxw

    r10504 r10505  
    1616  include("templates/spaceshipFS15.oxt")
    1717  include("templates/orbStation.oxt")
    18 
     18  include("templates/spaceshipSwallow.oxt")
    1919?>
    2020
     
    3333    <SpawnPoint team=0 position="-500,0,0" lookat="-1000,0,0" spawnclass=SpaceShip pawndesign=spaceshipfs15/>
    3434
     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
    3544    <!-- Docking  -->
    36     <Dock position="-1000,0,0" roll=0 yaw=0 >
     45    <Dock position="-2000,-1000,0" roll=0 yaw=0 >
    3746      <attached>
    3847        <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
     
    6776    </SpaceShip>
    6877
    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" >
    7379      <templates>
    7480        <Template link=orbStation/>
     
    8187    </MovableEntity>
    8288
    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">
    8493      <events>
    8594        <takeControl>
  • code/branches/presentationFS15/src/orxonox/controllers/ScriptController.cc

    r10489 r10505  
    245245              switch ((int) currentEvent.d) {
    246246                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),
    249249                                  this->currentEvent.v1.z);
    250250                break;
    251251                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),
    253253                                  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));
    255255                break;
    256256                case 1:
    257257                  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));
    260260                break;
    261261              }
Note: See TracChangeset for help on using the changeset viewer.