Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10622 for code/trunk/data


Ignore:
Timestamp:
Oct 4, 2015, 3:45:56 PM (9 years ago)
Author:
landauf
Message:

merged branch presentationFS15merge back to trunk

Location:
code/trunk
Files:
1 deleted
8 edited
25 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/defaultConfig/keybindings.ini

    r10281 r10622  
    142142KeyWebStop=
    143143KeyX="selectClosest"
    144 KeyY=
     144KeyY="onpress fire 4"
    145145KeyYen=
    146146KeyZ="selectNext"
  • code/trunk/data/gui/scripts/MultiplayerMenu.lua

    r8858 r10622  
    7070    if choice then
    7171        local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
    72         destination = P.serverList[index][2]
     72        destination = P.serverList[index][1]
    7373    else
    7474        return
     
    9393        local servername = ""
    9494        local serverip = ""
     95        local serverrtt = ""
     96        local playernumber = ""
    9597        while true do
    9698            servername = discovery:getServerListItemName(index)
     
    102104                break
    103105            end
    104             table.insert(P.serverList, {servername, serverip})
     106            --serverrtt = discovery:getServerListItemRTT(index)
     107            playernumber = discovery:getServerListItemPlayerNumber(index)
     108
     109            table.insert(P.serverList, {serverip, servername, playernumber})
    105110            index = index + 1
    106111        end
    107112        index = 1
    108113        for k,v in pairs(P.serverList) do
    109             local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )
     114            local item = CEGUI.createListboxTextItem("IP: " .. v[1] .. " Name: " .. v[2] .. " Players: " .. v[3])
    110115            item:setID(index)
    111116            index = index + 1
     
    125130        local servername = ""
    126131        local serverip = ""
     132        local serverrtt = ""
     133        local playernumber = ""
    127134        while true do
    128135            servername = discovery:getServerListItemName(index)
     
    134141                break
    135142            end
    136             table.insert(P.serverList, {servername, serverip})
     143            --serverrtt = discovery:getServerListItemRTT(index)
     144            playernumber = discovery:getServerListItemPlayerNumber(index)
     145
     146            table.insert(P.serverList, {serverip, servername, playernumber})
    137147            index = index + 1
    138148        end
    139149        index = 1
    140150        for k,v in pairs(P.serverList) do
    141             local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )
     151            local item = CEGUI.createListboxTextItem("IP: " .. v[1] .. " Name: " .. v[2] .. " Players: " .. v[3])
    142152            item:setID(index)
    143153            index = index + 1
     
    150160
    151161return P
    152 
  • code/trunk/data/gui/scripts/testscript.lua

    r10262 r10622  
    2222-- If it worked, call its "movetoposition" function
    2323if ctrl ~= nil then
    24   -- Move to the starting point at (xl+3000,yl,zl) while looking
    25   -- at xl,yl,zl over the time span of 3 seconds
    26   ctrl:eventScheduler("mal", xl+3000,yl,zl, xl,yl,zl, 1, 0)
    2724
    28   -- From there, perform a rotation around the harvester placed there
    29   -- in 100 steps
    30   dt = math.pi/100
    31   for t = 0,math.pi,dt do
    32     xt = math.cos(t)
    33     yt = math.sin(t)
    34 
    35     ctrl:eventScheduler("mal", xl+3000*xt, yl+3000*yt, zl, xl, yl, zl, dt, t+0.9)
    36   end
    37 
    38 
    39   -- Update absolute time
    40   Tabs = math.pi + 0.9
    41 
    42  
    43 
    44   -- Move away again, still looking at the station
    45   ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3, Tabs+0.4)
    46 
    47 
    48 
    49   -- Update absolute time
    50   Tabs = Tabs + 0.4 + 3
    51 
    52  
    53 
    54  
    55 
    56   -- Transition the look from (xl,yl,zl) to (3500,0,0) in 3 seconds
    57   ctrl:eventScheduler("chl", xl, yl, zl, xr, yr, zr, 2, Tabs+0.2)
    58 
    59   Tabs = Tabs + 2 + 0.2
    60 
    61    ctrl:eventScheduler("mal", xr + 600,yr,zr, xr,yr,zr, 4, Tabs+0)
    62 
    63    Tabs = Tabs + 4
    64 
    65   for t = 0,math.pi,dt do
    66     xt = math.cos(t)
    67     zt = math.sin(t)
    68 
    69     ctrl:eventScheduler("mal", xr+600*xt, yr, zr+600*zt, xr, yr, zr, dt, Tabs+t)
    70   end
    71 
    72   Tabs = Tabs + math.pi
    73 
    74   ctrl:eventScheduler("chl", xr, yr, zr, xl, yl, zl, 3, Tabs+0.2)
    75 
    76   Tabs = Tabs + 3 + 0.2
    77 
    78   ctrl:eventScheduler("mal", xm,ym,zm, xl,yl,zl, 4, Tabs+2.5)
    79 
     25  ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2)
     26  ctrl:eventScheduler("idle", 1)
     27  ctrl:eventScheduler("ral", xl, yl, zl, 3, 3000, 0, math.pi)
     28  ctrl:eventScheduler("idle", 1)
     29  ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3)
     30  ctrl:eventScheduler("idle", 1)
     31  ctrl:eventScheduler("chl", xl, yl, zl, xr, yr, zr, 2)
     32  ctrl:eventScheduler("idle", 1)
     33  ctrl:eventScheduler("mal", xr + 600,yr,zr, xr,yr,zr, 4)
     34  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)
     38  ctrl:eventScheduler("idle", 1)
    8039
    8140end
    82 
    83 
    84 
    85 -- Output the newctrlid variable we set from the C++ code
    86 if newctrlid ~= nil then
    87   orxonox.execute("orxout message test " .. newctrlid)
    88 end
    89 
    90 --orxonox.execute("setPause 1")
    91 
    92 
  • code/trunk/data/levels/includes/weaponSettingsAssff.oxi

    r8868 r10622  
    2525          </attached>
    2626          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
     27          <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare" muzzleoffset="2,-0.2,-1" />
    2728          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
    2829          <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
     
    3940        </Weapon>
    4041        <Weapon>
    41           <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
     42          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
    4243          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
    4344        </Weapon>
  • code/trunk/data/levels/scriptController.oxw

    r10262 r10622  
    11<!-- First levelFile of mkronig and samuezu. It was copied from dockingToASpaceStation.oxw and modified a little bit -->
    22<LevelInfo
    3  name = "Fancy orxout tests"
    4  description = "Docking into a spacestation."
     3 name = "Scriptable Controller"
     4 description = "Showcase for Scriptable Controller"
    55 tags = "showcase"
    66 screenshot = "emptylevel.png"
     
    1111  include("HUDTemplates3.oxo")
    1212  include("templates/lodInformation.oxt")
    13   include("templates/pickupRepresentationTemplates.oxt")
    1413?>
    1514
    1615<?lua
    17   include("templates/spaceshipAssff.oxt")
    18   include("templates/spaceshipPirate.oxt")
    1916  include("templates/spaceshipEscort.oxt")
    20   include("templates/bigship.oxt")
    21   include("templates/spaceshipTurret.oxt")
    22   include("templates/spaceshipCollateralDamage.oxt")
    23   include("templates/FPS.oxt")
    2417?>
    2518
     
    4033  >
    4134
    42     <?lua
    43       include("includes/pickups.oxi")
    44     ?>
     35    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
    4536
    46     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
    4737    <SpawnPoint team=0 position="3200,0,0" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
    4838
    49     <StaticEntity position  = "2800,0,0" mass=10000 collisionType=static >
     39    <Billboard position="2500,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=10 />
     40    <DistanceTrigger position="2500,0,0" distance="200" target="Pawn"
     41      beaconMode="exclude" targetname="bcnDestroyer" name="takeControl"
     42    />
     43
     44    <StaticEntity position  = "2000,500,2000" mass=10000 collisionType=static >
    5045      <attached>
    51         <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
     46        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=10 />
    5247      </attached>
    53       <collisionShapes>
    54         <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
    55         <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
    56         <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="140,0,-240" halfExtents="163,50,50" yaw=-120 />
    59         <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" yaw=-120 />
    62         <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 -->
    65         <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
    66         <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="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
    69         <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
    70       </collisionShapes>
    7148    </StaticEntity>
    7249
    73 <!-- Docking  -->
    74     <Dock position="2830,20,50" roll=0 yaw=0 >
    75         <animations>
    76             <MoveToDockingTarget target="destroyer" />
    77         </animations>
    78         <effects>
    79             <DockToShip target="spaceShip" />
    80         </effects>
     50    <StaticEntity position  = "-1000,3000,-1000" mass=10000 collisionType=static >
     51      <attached>
     52        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=80 />
     53      </attached>
     54    </StaticEntity>
     55
     56<!-- ControllerDirector waits for the event takeControl to attach a new Controller -->
     57    <ControllerDirector position="0,0,0" scriptname="presentation">
    8158        <events>
    82             <execute>
    83                 <EventListener event="dockMe" />
    84             </execute>
    85 
    86             <undocking>
    87                 <EventListener event="undockMe" />
    88             </undocking>
    89        
    90             <activity>
    91                 <EventListener event=notGameEnd />
    92             </activity>
     59            <takeControl>
     60                <EventListener event="takeControl" />
     61            </takeControl>
    9362        </events>
    94         <attached>
    95         <!-- Trigger for docking with billboard -->
    96 
    97                 <!-- removed -->
    98 
    99         <!-- Trigger for undocking with billboard -->
    100             <!-- <Billboard position="-2630,-19970,150" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 /> -->
    101             <DistanceTrigger position="-2630,-19970,150" distance="50" target="Pawn"
    102                 beaconMode="identify" targetname="bcnDestroyer" name="undockMe"
    103             />
    104         </attached>
    105     </Dock>
    106 
    107     <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=100 />
    108     <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
    109       beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
    110     />
    111 
    112 
    113 <!-- Object, which orxouts the message "hello Universe!". EVENT NOT WORKING  -->
    114     <ScriptController position="0,0,0">
    115         <events>
    116             <party>
    117                 <EventListener event="dockMe" />
    118             </party>
    119 
    120         </events>
    121 
    122     </ScriptController>
    123 
    124 
    125 <!-- FPS Player as destination of the dock -->
    126 <FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-19900,0" >
    127       <attached>
    128         <DockingTarget name="spaceShip" />
    129         <DistanceTriggerBeacon name="bcnDestroyer" />
    130         <DockingTarget name="destroyer" />
    131       </attached>
    132 </FpsPlayer>
    133 
    134 
    135 <!-- Cube as test SpaceStation
    136 
    137 The station can either be hidden outside of the skybox, within the hull of the space station if it is big enough or within a planet.
    138 Complex spacestations can be placed very far away from the spaceship so it is rendered at low resolution while the player uses the space ship.
    139 
    140 -->
    141   <StaticEntity position="0,-20000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
    142       <attached>
    143         <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" />
    144       </attached>
    145       <collisionShapes>
    146         <BoxCollisionShape position="0,0,0" halfExtents="400,400,25" />
    147       </collisionShapes>
    148   </StaticEntity>
    149 
    150 <!-- Homogenous gravitationfield to simulate local gravity (activating the normal gravity will affect the spaceship terribly) -->
    151 <ForceField position="0,-20000,0" mode="homogen" diameter="2000" forcedirection = "0,-500,0" />
    152 
    153 
    154 <!-- Some more stuff -->
    155 
    156     <!-- triple large belt around the planet  -->
    157     <?lua
    158         dofile("includes/asteroidField.lua")
    159         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
    160     ?>
    161     <?lua
    162         dofile("includes/asteroidField.lua")
    163         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
    164     ?>
    165     <?lua
    166         dofile("includes/asteroidField.lua")
    167         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
    168     ?>
    169 
    170     <Planet
    171       position="15000,0,-1000"
    172       scale="5000"
    173       collisionType="dynamic"
    174       linearDamping="0.8"
    175       angularDamping="0"
    176       mass="10000000"
    177       pitch="0"
    178       mesh="planets/ganymede.mesh"
    179       atmosphere="atmosphere1"
    180       rotationaxis="1,0,0"
    181       rotationrate="1.0"
    182       atmospheresize="80.0f"
    183       imagesize="1024.0f"
    184       collisiondamage = 2
    185       enablecollisiondamage = true
    186     >
    187       <attached>
    188         <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
    189       </attached>
    190       <collisionShapes>
    191         <SphereCollisionShape radius="5000" position="0,0,0" />
    192       </collisionShapes>
    193     </Planet>
     63    </ControllerDirector>
    19464
    19565  </Scene>
    196 
    19766</Level>
    19867
  • code/trunk/data/levels/templates/enemytowerdefense.oxt

    r10262 r10622  
    167167   maxhealth         = 200
    168168   initialhealth     = 100
    169 
     169   
    170170   shieldhealth        = 30
    171171   initialshieldhealth = 30
  • code/trunk/data/levels/towerDefense.oxw

    r10258 r10622  
    2020  include("templates/spaceshipAssff.oxt")
    2121  include("templates/spaceshipPirate.oxt")
    22   include("templates/tower.oxt")
     22  include("templates/towerdefensetower.oxt")
    2323  include("templates/enemytowerdefense.oxt")
    2424  include("templates/standardTurret.oxt")
    2525?>
    2626
    27 <!-- Specify the position of the camera -->
    28 <Template name=centerpointmarkcamera defaults=0>
    29   <Pawn team=1>
     27
     28<Template name=selectercameras defaults=0>
     29  <TowerDefenseSelecter>
    3030    <camerapositions>
    31       <CameraPosition position="0,0,1500"/>
     31      <CameraPosition position="0,0,1400" lookat="0,0,0" absolute=true />
    3232    </camerapositions>
    33   </Pawn>
     33  </TowerDefenseSelecter>
    3434</Template>
    3535
    36 <!-- Loads a mesh to mark the center-->
    37 <Template name=centerpointmark>
    38   <Pawn team=1 camerapositiontemplate=centerpointmarkcamera>
     36<Template name=selectertemplate>
     37  <TowerDefenseSelecter team=0 camerapositiontemplate=selectercameras>
    3938    <attached>
    40       <Model position="0,0,0" mesh="cylinder.mesh" scale3D="1,1,1" /> <!-- the camera is attached to this -->
     39      <Model pitch=90 position="0,0,-30" mesh="TD_Selection.mesh" scale=30 />
    4140    </attached>
    42   </Pawn>
     41  </TowerDefenseSelecter>
    4342</Template>
    44 
    45 
    46 <!-- Template for a tower   EDIT: new towertemplate is included with "templates/tower" -->
    47 <!--Template name=towertemplate>
    48   <Tower>
    49     <attached>
    50       <Model position="0,0,0" scale=0.25 mesh="Tower_ME.mesh" />
    51     </attached>
    52   </Tower>
    53 </Template-->
    54 
    5543
    5644
     
    7260
    7361    <!-- Spawns the camera, attached to a crate -->
    74     <SpawnPoint team=1 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
    75     <!--TeamSpawnPoint team=1 position="-7,7,4" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff /-->
    76 
    77     <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff  /-->
    78     <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
    79 
    80 
    81 
    82 
    83     <!--invisible entity to attach towers to, since playfield is static and towers are dynamic-->
    84     <StaticEntity team =1 position=0,0,0>
    85 
    86         <attached>
    87             <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
    88             <!-- Base -->
    89             <Model position="500,700,100" mesh="sphere.mesh" scale=80 />
    90             <!--Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /--> <!-- Only temporary needed to help align the collisionshape -->
    91             <!-- This was used to mark the playfield, let's let it be here for now -->
    92             <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    93             <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    94             <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    95             <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    96         </attached>
    97         <collisionShapes> <!-- The collisionshape forbids other worldentities that have a collisionShape to fly through it.
    98 
    99                                TODO: Find correct size for the collisionshape; since a collisionShape is invisible
    100                                I added the crate wich currently has the same dimensions as the collisionshape.
    101                                You have to adjust the crate's scale3D as well as the collisionshape's halfExtens to
    102                                find the proper shape. -->
    103            <BoxCollisionShape position="0,0,0" halfExtents="400,400,100" />
    104         </collisionShapes>
    105     </StaticEntity>
    106 
    107 
    108 
     62    <SpawnPoint team=0 position="0,0,0"/>
    10963
    11064    <!-- PlayField -->
    11165    <TowerDefenseCenterpoint
    11266    name=towerdefensecenter
     67
     68    selecterTemplate=selectertemplate
     69
    11370    width=16
    11471    height=16
    11572    tileScale=100
    116     towerTemplate=tower
    11773    position="0,0,0"
    11874    direction="0,0,0"
    11975    collisionType=dynamic
    12076    mass=100000
    121     team=1
    122     />
     77    >
     78        <attached>
     79            <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
     80            <Model position="500,700,100" mesh="sphere.mesh" scale=80 />
     81        </attached>
     82        <camerapositions>
     83      <CameraPosition position="0,0,1500" lookat="0,0,0" absolute=true/>
     84    </camerapositions>
     85    </TowerDefenseCenterpoint>
    12386
    12487  </Scene>
Note: See TracChangeset for help on using the changeset viewer.