Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6417 for code/trunk/data


Ignore:
Timestamp:
Dec 25, 2009, 10:23:58 PM (14 years ago)
Author:
rgrieder
Message:

Merged presentation2 branch back to trunk.
Major new features:

  • Actual GUI with settings, etc.
  • Improved space ship steering (human interaction)
  • Rocket fire and more particle effects
  • Advanced sound framework
Location:
code/trunk
Files:
1 deleted
37 edited
49 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/DataInstallScript.cmake

    r5781 r6417  
    2929
    3030# Write some comment
    31 FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr "\n\n\n <!-- ---------------------------------------- -->")
    32 FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr     "\n <!-- Content from the external data directory -->")
    33 FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr     "\n <!-- ---------------------------------------- -->\n\n")
     31FILE(APPEND @DATA_INSTALL_DIRECTORY@/DefaultResources.oxr "\n\n\n <!-- ---------------------------------------- -->")
     32FILE(APPEND @DATA_INSTALL_DIRECTORY@/DefaultResources.oxr     "\n <!-- Content from the external data directory -->")
     33FILE(APPEND @DATA_INSTALL_DIRECTORY@/DefaultResources.oxr     "\n <!-- ---------------------------------------- -->\n\n")
    3434
    3535# Append the external file
    3636FILE(READ   @EXTERNAL_DATA_DIRECTORY@/resources.oxr _external_file)
    37 FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr ${_external_file})
     37FILE(APPEND @DATA_INSTALL_DIRECTORY@/DefaultResources.oxr ${_external_file})
  • code/trunk/data/defaultConfig/keybindings.ini

    r5929 r6417  
    2323KeyEnd=boost
    2424KeyEquals=
    25 KeyEscape="exit"
     25KeyEscape="keyESC"
    2626KeyF="scale -1 moveUpDown"
    2727KeyF1="OverlayGroup toggleVisibility Debug"
     
    122122KeyStop=
    123123KeySystemRequest=
    124 KeyT=
    125 KeyTab="cycleNavigationFocus"
    126 KeyU=
     124KeyT="onpress fire 2"
     125KeyTab="NewHumanController changeMode"
     126KeyU=""
    127127KeyUP="scale 1 moveFrontBack"
    128128KeyUnassigned="openConsole"
     
    147147
    148148[MouseButtons]
    149 MouseButton3=
    150 MouseButton4=
    151 MouseButton5=
    152 MouseButton6=
    153 MouseButton7=
    154 MouseLeft="fire 0"
    155 MouseMiddle=
    156 MouseRight="fire 1"
    157 MouseWheel1Down=
    158 MouseWheel1Up=
    159 MouseWheel2Down=
    160 MouseWheel2Up=
     149Button3=
     150Button4=
     151Button5=
     152Button6=
     153Button7=
    161154Left="fire 0"
    162 Right="fire 1"
     155Middle=
     156Right= fire 1 | unfire
     157Wheel1Down="NewHumanController decelerate"
     158Wheel1Up="NewHumanController accelerate"
     159Wheel2Down=
     160Wheel2Up=
    163161
    164162[MouseAxes]
  • code/trunk/data/gui/layouts/MainMenu.layout

    r5781 r6417  
    1 <?xml version="1.0" ?>
    2 <GUILayout>
    3     <Window Type="TaharezLook/StaticImage" Name="orxonox/Background">
    4     <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>
    5     <Property Name="Image" Value="set:MainMenuBackground image:Background"/>
    6     <Property Name="FrameEnabled" Value="set:true"/>
    7     <Property Name="BackgroundEnabled" Value="set:false"/>
    8  
    9         <Window Type="TaharezLook/Button" Name="orxonox/StandaloneButton">
    10             <Property Name="UnifiedPosition" Value="{{0.11,0},{0.3,0}}"/>
    11             <Property Name="UnifiedSize" Value="{{0.15,0},{0.05,0}}"/>
    12             <Property Name="Text" Value="Standalone"/>
    13             <Property Name="Disabled" Value="true"/>
    14             <Event Name="Clicked" Function="MainMenu.button_standalone_clicked"/>
     1<?xml version="1.0" encoding="UTF-8"?>
     2
     3<GUILayout >
     4    <Window Type="TaharezLook/StaticImage" Name="orxonox/MainMenuBackground" >
     5        <Property Name="FrameEnabled" Value="False" />
     6        <Property Name="InheritsAlpha" Value="False" />
     7        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     8        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.02125,0},{1.02167,0}}" />
     9        <Property Name="BackgroundEnabled" Value="False" />
     10        <Window Type="TaharezLook/Button" Name="orxonox/QuickGameTestButton" >
     11            <Property Name="Text" Value="Quickstart" />
     12            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     13            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" />
     14            <Event Name="Clicked" Function="MainMenu.QuickGameTestButton_clicked"/>
    1515        </Window>
    16        
    17         <Window Type="TaharezLook/Listbox" Name="orxonox/LevelListbox">
    18             <Property Name="UnifiedPosition" Value="{{0.4,0},{0.3,0}}"/>
     16        <Window Type="TaharezLook/Button" Name="orxonox/SingleplayerButton" >
     17            <Property Name="Text" Value="Singleplayer" />
    1918            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    20             <Property Name="UnifiedSize" Value="{{0.35,0},{0.33,0}}" />
    21             <Property Name="Tooltip" Value="Available Levels." />
    22             <Event Name="ItemSelectionChanged" Function="MainMenu.listbox_level_selectionchanged" />
     19            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
     20            <Event Name="Clicked" Function="MainMenu.SingleplayerButton_clicked"/>
    2321        </Window>
    24        
    25         <Window Type="TaharezLook/Button" Name="orxonox/DedicatedButton">
    26             <Property Name="UnifiedPosition" Value="{{0.11,0},{0.376,0}}"/>
    27             <Property Name="UnifiedSize" Value="{{0.15,0},{0.05,0}}"/>
    28             <Property Name="Text" Value="Dedicated"/>
    29             <Event Name="Clicked" Function="MainMenu.button_dedicated_clicked"/>
     22        <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerButton" >
     23            <Property Name="Text" Value="Multiplayer" />
     24            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     25            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4375,0},{0.6,0},{0.4875,0}}" />
     26            <Event Name="Clicked" Function="MainMenu.MultiplayerButton_clicked"/>
    3027        </Window>
    31        
    32         <Window Type="TaharezLook/Button" Name="orxonox/ServerButton">
    33             <Property Name="UnifiedPosition" Value="{{0.11,0},{0.452,0}}"/>
    34             <Property Name="UnifiedSize" Value="{{0.15,0},{0.05,0}}"/>
    35             <Property Name="Text" Value="Server"/>
    36             <Event Name="Clicked" Function="MainMenu.button_server_clicked"/>
     28        <Window Type="TaharezLook/Button" Name="orxonox/SettingsButton" >
     29            <Property Name="Text" Value="Settings" />
     30            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     31            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5125,0},{0.6,0},{0.5625,0}}" />
     32            <Event Name="Clicked" Function="MainMenu.SettingsButton_clicked"/>
    3733        </Window>
    38        
    39         <Window Type="TaharezLook/Button" Name="orxonox/ClientButton">
    40             <Property Name="UnifiedPosition" Value="{{0.11,0},{0.528,0}}"/>
    41             <Property Name="UnifiedSize" Value="{{0.15,0},{0.05,0}}"/>
    42             <Property Name="Text" Value="Client"/>
    43             <Event Name="Clicked" Function="MainMenu.button_client_clicked"/>
     34        <Window Type="TaharezLook/Button" Name="orxonox/CreditsButton" >
     35            <Property Name="Text" Value="Credits" />
     36            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     37            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5875,0},{0.6,0},{0.6375,0}}" />
     38            <Event Name="Clicked" Function="MainMenu.CreditsButton_clicked"/>
    4439        </Window>
    45        
    46         <Window Type="TaharezLook/Button" Name="orxonox/QuitButton">
    47             <Property Name="UnifiedPosition" Value="{{0.11,0},{0.604,0}}"/>
    48             <Property Name="UnifiedSize" Value="{{0.15,0},{0.05,0}}"/>
    49             <Property Name="Text" Value="Quit"/>
    50             <Event Name="Clicked" Function="MainMenu.button_quit_clicked"/>
     40        <Window Type="TaharezLook/Button" Name="orxonox/ExitButton" >
     41            <Property Name="Text" Value="Exit" />
     42            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     43            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
     44            <Event Name="Clicked" Function="MainMenu.ExitButton_clicked"/>
    5145        </Window>
    5246    </Window>
  • code/trunk/data/gui/layouts/PickupInventory.layout

    r5781 r6417  
    1515            <Property Name="TabPanePosition" Value="Bottom" />
    1616            <Property Name="UnifiedAreaRect" Value="{{0,10},{0,30},{1,-10},{1,-10}}" />
    17            
     17
    1818            <Window Type="TaharezLook/ScrollablePane" Name="orxonox/Inventory/TabControl/TabEquipment">
    1919                <Property Name="Text" Value="Equipment" />
  • code/trunk/data/gui/layouts/QuestGUI.layout

    r5781 r6417  
    66    <Property Name="FrameEnabled" Value="set:true"/>
    77    <Property Name="BackgroundEnabled" Value="set:false"/>
     8    <Property Name="InheritsAlpha" Value="False" />
    89
    910        <Window Type="TaharezLook/Titlebar" Name="orxonox/QuestGUI/Title">
  • code/trunk/data/gui/scripts/InitialiseGUI.lua

    r5781 r6417  
    1414
    1515loadedGUIs = {}
     16cursorVisibility = {}
     17activeSheets = {}
     18nrOfActiveSheets = 0
     19root = nil
     20bShowsCursor = false
     21bHidePrevious = {}
     22
     23-- Require all tools
     24require("GUITools")
    1625
    1726-- loads the GUI with the specified filename
     
    2231    if loadedGui == nil then
    2332        loadedGuiNS = require(filename)
     33        if loadedGuiNS == nil then
     34            return
     35        end
    2436        loadedGui = loadedGuiNS:load()
    2537        loadedGUIs[filename] = loadedGui
     
    2739        if table.getn(loadedGUIs) == 1 then
    2840            current = loadedGUIs[1]
    29             showing = false
    3041        end
    3142        -- hide new GUI as we do not want to show it accidentially
     
    3546end
    3647
    37 function showGUI(filename, ptr)
    38     gui = showGUI(filename)
     48function showGUI(filename, hidePrevious, bCursorVisible, ptr)
     49    gui = showGUI(filename, hidePrevious, bCursorVisible)
    3950    gui.overlay = ptr
    4051end
     
    4253-- shows the specified and loads it if not loaded already
    4354-- be sure to set the global variable "filename" before calling this function
    44 function showGUI(filename)
    45     if current == nil or current.filename ~= filename then
    46         current = loadedGUIs[filename]
    47         if current == nil then
    48             current = loadGUI(filename)
    49         end
    50         system:setGUISheet(current.window)
    51     end
    52     current:show()
    53     showing = true
    54     return current
    55 end
    56 
    57 function toggleGUI()
    58     if showing == true then
    59         current:hide()
     55function showGUI(filename, hidePrevious, bCursorVisible)
     56    if bCursorVisible == nil then
     57        if nrOfActiveSheets > 0 then
     58            bCursorVisible = cursorVisibility[activeSheets[nrOfActiveSheets]]
     59        else
     60            bCursorVisible = true
     61        end
     62    end
     63
     64    if root == nil then
     65        setBackground("")
     66    end
     67
     68    local currentGUI = loadedGUIs[filename]
     69    if(currentGUI == nil) then
     70        currentGUI = loadGUI(filename)
     71    end
     72
     73    if(root:isChild(currentGUI.window)) then
     74        root:removeChildWindow(currentGUI.window)
     75    end
     76    root:addChildWindow(currentGUI.window)
     77
     78    if bCursorVisible then
     79        showCursor()
     80    else
     81        hideCursor()
     82    end
     83
     84    if find( activeSheets, filename ) ~= nil then
     85        table.remove( activeSheets, find( activeSheets, filename ) )
     86        nrOfActiveSheets = nrOfActiveSheets - 1
     87    else
     88        if nrOfActiveSheets == 0 then
     89            orxonox.InputManager:getInstance():enterState("guiMouseOnly")
     90            orxonox.HumanController:pauseControl()
     91        end
     92    end
     93    nrOfActiveSheets = nrOfActiveSheets + 1
     94    table.insert(activeSheets, filename)
     95    activeSheets[nrOfActiveSheets] = filename
     96    bHidePrevious[filename]=hidePrevious
     97    cursorVisibility[filename] = bCursorVisible
     98
     99    if hidePrevious == true then
     100        for i=1,nrOfActiveSheets-1 do
     101            loadedGUIs[ activeSheets[i] ]:hide()
     102        end
     103    end
     104    currentGUI:show()
     105    return currentGUI
     106end
     107
     108function hideCursor()
     109    if bShowsCursor==true then
     110        bShowsCursor=false
    60111        cursor:hide()
    61         showing = false
    62     else
    63         current:show()
     112    end
     113end
     114
     115function showCursor()
     116    if bShowsCursor==false then
     117        bShowsCursor=true
    64118        cursor:show()
    65         showing = true
    66     end
    67     return showing
    68 end
    69 
    70 function hideCursor()
    71     cursor:hide()
    72 end
    73 
    74 function showCursor()
    75     cursor:show()
     119    end
    76120end
    77121
    78122function hideGUI(filename)
    79     current = loadedGUIs[filename]
    80     if current ~= nil then
    81         current:hide()
    82         showing = false
    83     end
    84 end
     123    local currentGUI = loadedGUIs[filename]
     124    if currentGUI == nil then
     125        return
     126    end
     127    currentGUI:hide()
     128    if bHidePrevious[filename] == true then
     129        local i = nrOfActiveSheets-1
     130        while i>0 do
     131            loadedGUIs[ activeSheets[i] ]:show()
     132            if bHidePrevious[filename]==true then
     133                break
     134            else
     135                i=i-1
     136            end
     137        end
     138    end
     139    root:removeChildWindow(currentGUI.window)
     140    local i=1
     141    while activeSheets[i] do
     142        if activeSheets[i+1] == nil then
     143            if activeSheets[i-1] ~= nil then
     144                if cursorVisibility[ activeSheets[i-1] ] == true then
     145                    showCursor()
     146                else
     147                    hideCursor()
     148                end
     149            else
     150                hideCursor()
     151            end
     152        end
     153        if activeSheets[i] == filename then
     154            table.remove( activeSheets, i )
     155            nrOfActiveSheets = nrOfActiveSheets-1
     156        else
     157            i = i+1
     158        end
     159    end
     160    cursorVisibility[filename] = nil -- remove the cursor visibility of the current gui from the table
     161    bHidePrevious[filename] = nil
     162    if nrOfActiveSheets == 0 then
     163        orxonox.InputManager:getInstance():leaveState("guiMouseOnly")
     164        orxonox.HumanController:resumeControl()
     165        hideCursor()
     166    end
     167end
     168
     169function hideAllGUIs()
     170    while nrOfActiveSheets ~= 0 do
     171        hideGUI(activeSheets[nrOfActiveSheets])
     172    end
     173end
     174
     175function keyESC()
     176    if nrOfActiveSheets == 1 and activeSheets[1] == "MainMenu" then
     177        orxonox.execute("exit")
     178    elseif nrOfActiveSheets > 0 then
     179        orxonox.execute("hideGUI "..activeSheets[nrOfActiveSheets])
     180    else
     181        showGUI("InGameMenu")
     182    end
     183end
     184
     185function setBackground(filename)
     186    local newroot
     187    if root ~= nil then
     188        root:rename("oldRootWindow")
     189    end
     190    if filename ~= "" then
     191        newroot = winMgr:loadWindowLayout(filename .. ".layout")
     192        newroot:rename("AbsoluteRootWindow")
     193        system:setGUISheet(newroot)
     194    else
     195        newroot = winMgr:createWindow("DefaultWindow", "AbsoluteRootWindow")
     196        newroot:setProperty("Alpha", "0.0")
     197        newroot:setSize(CEGUI.UVector2(CEGUI.UDim(1.0,0),CEGUI.UDim(1.0,0)))
     198        system:setGUISheet(newroot)
     199    end
     200    if root ~= nil then
     201        local child
     202        while root:getChildCount()~=0 do
     203            child = root:getChildAtIdx(0)
     204            root:removeChildWindow(child)
     205            newroot:addChildWindow(child)
     206        end
     207        winMgr:destroyWindow(root)
     208    end
     209    newroot:show()
     210    root = newroot
     211end
     212
     213function find(table, value)
     214    local i=0
     215    while table[i] ~= nil do
     216        if table[i]==value then
     217            return i
     218        else
     219            i=i+1
     220        end
     221    end
     222    return nil
     223end
     224
     225function test(e)
     226    debug(0, "Blubb")
     227end
  • code/trunk/data/gui/scripts/MainMenu.lua

    r5781 r6417  
    1212P.layoutString = "MainMenu.layout"
    1313
    14 function P:init()
    15     listbox = winMgr:getWindow("orxonox/LevelListbox")
    16     preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
    17     orxonox.LevelManager:getInstance():compileAvailableLevelList()
    18     local levelList = {}
    19     local index = 0
    20     local level = ""
    21     while true do
    22       level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
    23       if level == "" then
    24         break
    25       end
    26       table.insert(levelList, level)
    27       index = index + 1
    28     end
    29     table.sort(levelList)
    30     for k,v in pairs(levelList) do
    31         item = CEGUI.createListboxTextItem(v)       
    32         item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
    33         CEGUI.toListbox(listbox):addItem(item)
    34         if v .. ".oxw" == preselect then
    35             listbox:setItemSelectState(item, true)
    36         end
    37     end
     14-- events for MainMenu
     15function P.QuickGameTestButton_clicked(e)
     16    orxonox.execute("startGame")
    3817end
    3918
    40 
    41 -- events for mainmenu
    42 function P.button_quit_clicked(e)
    43     hideGUI()
    44     orxonox.CommandExecutor:execute("exit")
     19function P.SingleplayerButton_clicked(e)
     20    showGUI("SingleplayerMenu", true)
    4521end
    4622
    47 function P.button_standalone_clicked(e)
    48     choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
    49     if choice then
    50         orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    51         orxonox.CommandExecutor:execute("startGame")
    52         toggleGUI()
    53     end
     23function P.MultiplayerButton_clicked(e)
     24    showGUI("MultiplayerMenu", true)
    5425end
    5526
    56 function P.button_server_clicked(e)
    57     choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
    58     if choice then
    59         orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    60         orxonox.CommandExecutor:execute("startServer")
    61         toggleGUI()
    62     end
     27function P.SettingsButton_clicked(e)
     28    showGUI("SettingsMenu", true)
    6329end
    6430
    65 function P.button_dedicated_clicked(e)
    66     choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
    67     if choice then
    68         orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    69         orxonox.CommandExecutor:execute("startDedicated")
    70         toggleGUI()
    71     end
     31function P.CreditsButton_clicked(e)
     32    showGUI("CreditsMenu", true)
    7233end
    7334
    74 function P.button_client_clicked(e)
    75     choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
    76     if choice then
    77         orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    78         orxonox.CommandExecutor:execute("startClient")
    79         toggleGUI()
    80     end
    81 end
    82 
    83 function P.listbox_level_selectionchanged(e)
    84     if winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem() then
    85         winMgr:getWindow("orxonox/StandaloneButton"):enable()
    86     else
    87         winMgr:getWindow("orxonox/StandaloneButton"):disable()
    88     end
     35function P.ExitButton_clicked(e)
     36    orxonox.execute("exit")
    8937end
    9038
  • code/trunk/data/gui/scripts/PickupInventory.lua

    r5781 r6417  
    2020    local equipCount = orxonox.PickupInventory:getEquipmentCount()
    2121    local usableCount = orxonox.PickupInventory:getUsableCount()
    22    
     22
    2323    if equipCount ~= self.lastEquipmentCount_ or usableCount ~= self.lastUsableCount_ then
    2424        self:updateTabs()
     
    3939    local t = name:sub(25, 27)
    4040    local i = name:sub(29)
    41    
     41
    4242    if t == "equ" then
    43        
     43
    4444    end
    45    
     45
    4646    if t == "use" then
    4747        if self.currentUsableID_ >= 0 then
     
    6060    orxonox.PickupInventory:getSingleton():clearInventory(winMgr, eqWin, usWin)
    6161    orxonox.PickupInventory:getSingleton():updateTabs(winMgr, eqWin, usWin)
    62    
     62
    6363    self.currentUsableID_ = orxonox.PickupInventory:getCurrentUsableIndex()
    6464    self.lastEquipmentCount_ = orxonox.PickupInventory:getEquipmentCount()
  • code/trunk/data/gui/scripts/QuestGUI.lua

    r5781 r6417  
    1515
    1616    local questManager = orxonox.QuestManager:getInstance()
    17      
     17
    1818    local questsList = winMgr:getWindow("orxonox/QuestGUI/QuestsList")
    1919
  • code/trunk/data/levels/empty_level.oxw

    r5781 r6417  
    1717    skybox       = "Orxonox/Starbox"
    1818  >
     19
     20<!--Rocket position="-10, 3.5,800" velocity="0,0,-100">
     21      <attached>
     22        <Model pitch=180 position="0,0,0" scale=1.5 mesh="rocket_test.mesh" >
     23          <attached>
     24           <ParticleEmitter pitch=0 roll=0 position="0,5,0" source="Orxonox/laser" lifetime=2.0 loop=1 startdelay=3.0/>
     25           <ParticleEmitter pitch=-90 roll=0 position="0,-5,0" source="Orxonox/particlecanon" lifetime=2.0 loop=1 startdelay=3.0/>
     26           <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/rocketfire" lifetime=2.0 loop=1 startdelay=3.0 />
     27           <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/smoke" lifetime=2.0 loop=1 startdelay=3.0 />
     28          </attached>
     29          </Model>
     30        </attached>
     31    </Rocket-->
     32
     33
    1934    <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" />
    20     <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshippirate />
     35    <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshipassff />
    2136  </Scene>
    2237</Level>
  • code/trunk/data/levels/events.oxw

    • Property svn:eol-style set to native
    r5929 r6417  
    4545      works with all amounts of objects from zero to infinity. In the examples I used two objects each.
    4646    -->
    47      
     47
    4848
    4949    <!-- red -->
  • code/trunk/data/levels/gametype_asteroids.oxw

    r5781 r6417  
    2828?>
    2929
    30     <MovableEntity 
    31      position="<?lua print(math.random()* 15000 - 1000) ?>,<?lua print(math.random() * 12000 - 4000) ?>,<?lua print(math.random() * 12000 - 4000) ?>"        collisionType=dynamic 
     30    <MovableEntity
     31     position="<?lua print(math.random()* 15000 - 1000) ?>,<?lua print(math.random() * 12000 - 4000) ?>,<?lua print(math.random() * 12000 - 4000) ?>"        collisionType=dynamic
    3232     linearDamping=0.8
    3333     angularDamping=0
    34      scale=<?lua print(j * 150)?> 
     34     scale=<?lua print(j * 150)?>
    3535     collisiondamage=1
    3636     enablecollisiondamage=true>
  • code/trunk/data/levels/includes/weaponsettings3.oxi

    r5781 r6417  
    22      <WeaponSlot position="-15.0,-1.5,0" />
    33      <WeaponSlot position=" 15.0,-1.5,0" />
    4       <WeaponSlot position="  0.0, 0.0,0" />
     4      <WeaponSlot position="    0,   0,0" />
    55    </weaponslots>
    66    <weaponsets>
    77      <WeaponSet firemode=0 />
    88      <WeaponSet firemode=1 />
     9      <WeaponSet firemode=2 />
    910    </weaponsets>
    1011    <weapons>
     
    1314          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
    1415          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
     16          <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
    1517        </links>
    1618        <Weapon>
     
    3638          <LightningGun mode=1 muzzleoffset="0,0,0" />
    3739        </Weapon>
     40        <Weapon>
     41          <RocketFire mode=2 muzzleoffset="0,0,0" />
     42        </Weapon>
    3843      </WeaponPack>
    3944      <WeaponPack>
     
    4146          <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
    4247        </links>
    43         <Weapon>
    44           <!-- EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" / -->
    45         </Weapon>
     48        <!--Weapon>
     49          <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
     50        </Weapon-->
    4651      </WeaponPack>
    4752    </weapons>
  • code/trunk/data/levels/includes/weaponsettings_ghost.oxi

    • Property svn:eol-style set to native
    r5989 r6417  
    1616          <HsW01 mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare" />
    1717          <HsW01 mode=0 munitionpershot=0 delay=0.125 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
     18          <LightningGun mode=1 muzzleoffset="0,0,0" />
    1819        </Weapon>
    1920        <Weapon>
    2021          <HsW01 mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare" />
    2122          <HsW01 mode=0 munitionpershot=0 delay=0.125 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
     23          <LightningGun mode=1 muzzleoffset="0,0,0" />
    2224        </Weapon>
    2325      </WeaponPack>
  • code/trunk/data/levels/old/physicstest.oxw

    r5781 r6417  
    1212
    1313<?lua
    14 for i = 1, 226, 1 
     14for i = 1, 226, 1
    1515do ?>
    1616  <Model position="<?lua print(math.random() * 40000 - 20000)?>, <?lua print(math.random() * 40000 - 20000) ?>, <?lua print(math.random() * 40000 - 20000) ?>" scale="<?lua print(math.random() * 250 + 20) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" rotationAxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationRate="<?lua print(math.random() * 30 + 15) ?>" />
    17 <?lua 
     17<?lua
    1818end
    1919?>
  • code/trunk/data/levels/old/physicstest2.oxw

    r5929 r6417  
    2121    <SpawnPoint position="0, 300, -300" pitch=-90 spawnclass=SpaceShip pawndesign=spaceshipassff /-->
    2222
    23         <!-- axes in ogre's origin of coordinate system for phsics engine testing purposes-->
    24         <StaticEntity
     23    <!-- axes in ogre's origin of coordinate system for phsics engine testing purposes-->
     24    <StaticEntity
    2525     position        = "0,0,0"
    2626     name            = "banana"
     
    3535        <PlaneCollisionShape name="thePlane" planeNormal="0,1,0" planeOffset=0 />
    3636      </collisionShapes>
    37         </StaticEntity>
    38 
    39         <!-- red sphere for phsics engine testing purposes-->
    40         <!--StaticEntity position="40,0,0">
    41                 <attached>
    42                         <Model position="0,0,0" scale=1 mesh="sphere.mesh" />
    43                 </attached>
    44         </StaticEntity-->
    45 
    46         <!-- yellow cube for phsics engine testing purposes-->
    47         <!--StaticEntity position="80,0,0">
     37    </StaticEntity>
     38
     39    <!-- red sphere for phsics engine testing purposes-->
     40    <!--StaticEntity position="40,0,0">
     41      <attached>
     42        <Model position="0,0,0" scale=1 mesh="sphere.mesh" />
     43      </attached>
     44    </StaticEntity-->
     45
     46    <!-- yellow cube for phsics engine testing purposes-->
     47    <!--StaticEntity position="80,0,0">
    4848      <attached>
    4949        <Model position="0,0,0" scale=1 mesh="cube.mesh" />
    5050      </attached>
    51         </StaticEntity-->
     51    </StaticEntity-->
    5252
    5353    <MovableEntity
  • code/trunk/data/levels/old/presentation_physics.oxw

    r5781 r6417  
    3030        <PlaneCollisionShape planeNormal="0,1,0" planeOffset=0 />
    3131      </collisionShapes>
    32         </StaticEntity>
     32    </StaticEntity>
    3333
    34         <MovableEntity
     34    <MovableEntity
    3535     position        = "0,250,500"
    3636     rotationaxis    = "1, 1, 1"
     
    6464        <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
    6565      </collisionShapes>
    66         </MovableEntity>
     66    </MovableEntity>
    6767
    6868    <?lua
  • code/trunk/data/levels/old/princessaeryn.oxw

    r5929 r6417  
    66
    77<?lua
    8         dofile("includes/CuboidSpaceStation.lua")
     8    dofile("includes/CuboidSpaceStation.lua")
    99?>
    1010
    1111<NotificationQueue
    12         name  = "notification"
    13         position = "1.0, 1.0"
    14         targets = "questsystem"
     12 name  = "notification"
     13 position = "1.0, 1.0"
     14 targets = "questsystem"
    1515/>
    1616
  • code/trunk/data/levels/old/questsystem.oxw

    r5781 r6417  
    66
    77<NotificationQueue
    8         name  = "notification"
    9         position = "1.0, 1.0"
    10         targets = "all"
     8 name  = "notification"
     9 position = "1.0, 1.0"
     10 targets = "all"
    1111/>
    1212
     
    2929        </GlobalQuest>
    3030
    31                                 <ParticleSpawner position="0,0,100" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
    32                                   <events>
    33                                     <spawn>
    34                                       <EventTrigger delay=1>
    35                                         <events>
    36                                           <trigger>
    37                                             <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshipassff />
    38                                           </trigger>
    39                                         </events>
    40                                       </EventTrigger>
    41                                     </spawn>
    42                                   </events>
    43                                 </ParticleSpawner>
     31        <ParticleSpawner position="0,0,100" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
     32            <events>
     33                <spawn>
     34                    <EventTrigger delay=1>
     35                        <events>
     36                            <trigger>
     37                                <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshipassff />
     38                            </trigger>
     39                        </events>
     40                    </EventTrigger>
     41                </spawn>
     42            </events>
     43        </ParticleSpawner>
    4444
    4545        <QuestEffectBeacon position="0,0,100" times=-1>
  • code/trunk/data/levels/old/sample4.oxw

    r5929 r6417  
    2323        <Model position="0,0,0" scale=10 mesh="satellite.mesh" />
    2424        <MovableEntity position="-4,0,0" velocity="0,0,0" rotationaxis="0,0,1" rotationrate=50>
    25           <attached>
     25          <attached>
    2626            <Model position="4,0,0" scale=10 mesh="satellitedish.mesh"/>
    2727          </attached>
    28         </MovableEntity>
     28        </MovableEntity>
    2929        <ParticleEmitter pitch=-135 roll=30 position="-14, 3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
    3030        <ParticleEmitter pitch=135 roll=30 position="-14, 3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
  • code/trunk/data/levels/old/spaceshiptemplates_physics.oxw

    r5781 r6417  
    1010   auxilaryThrust    = 30;
    1111   rotationThrust    = 10;
    12    
     12
    1313   collisionType     = "dynamic"
    1414   mass              = 100
  • code/trunk/data/levels/old/tutorial_hs08.oxw

    r5781 r6417  
    1919<!-- Embedded lua code (creates random asteroids) -->
    2020<?lua
    21 for i = 1, 226, 1 
     21for i = 1, 226, 1
    2222do ?>
    2323  <Model position="<?lua print(math.random() * 40000 - 20000)?>, <?lua print(math.random() * 40000 - 20000) ?>, <?lua print(math.random() * 40000 - 20000) ?>" scale="<?lua print(math.random() * 250 + 20) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" rotationAxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationRate="<?lua print(math.random() * 30 + 15) ?>" />
    24 <?lua 
     24<?lua
    2525end
    2626?>
  • code/trunk/data/levels/presentation.oxw

    r5929 r6417  
    2020
    2121
    22         <!-- axes in ogre's origin of coordinate system for phsics engine testing purposes-->
    23         <!--StaticEntity position="0,0,0">
    24                 <attached>
    25                         <Model position="0,0,0" scale=1 mesh="axes.mesh" />
    26                 </attached>
    27         </StaticEntity -->
     22    <!-- axes in ogre's origin of coordinate system for phsics engine testing purposes-->
     23    <!--StaticEntity position="0,0,0">
     24      <attached>
     25        <Model position="0,0,0" scale=1 mesh="axes.mesh" />
     26      </attached>
     27    </StaticEntity -->
    2828
    29         <!-- red sphere for phsics engine testing purposes-->
    30         <!--StaticEntity position="40,0,0">
    31                 <attached>
    32                         <Model position="0,0,0" scale=1 mesh="sphere.mesh" />
    33                 </attached>
    34         </StaticEntity-->
     29    <!-- red sphere for phsics engine testing purposes-->
     30    <!--StaticEntity position="40,0,0">
     31      <attached>
     32        <Model position="0,0,0" scale=1 mesh="sphere.mesh" />
     33      </attached>
     34    </StaticEntity-->
    3535
    36         <!-- yellow cube for phsics engine testing purposes-->
    37         <!--StaticEntity position="80,0,0">
    38                 <attached>
    39                         <Model position="0,0,0" scale=1 mesh="cube.mesh" />
    40                 </attached>
    41         </StaticEntity-->
     36    <!-- yellow cube for phsics engine testing purposes-->
     37    <!--StaticEntity position="80,0,0">
     38      <attached>
     39        <Model position="0,0,0" scale=1 mesh="cube.mesh" />
     40      </attached>
     41    </StaticEntity-->
    4242
    43         <!-- Carrier with guns not implemented yet -->
    44         <MovableEntity position="-2000,-1000,-2000" pitch="-90" roll="90">
     43    <!-- Carrier with guns not implemented yet -->
     44    <MovableEntity position="-2000,-1000,-2000" pitch="-90" roll="90">
    4545      <attached>
    4646        <Model position="0,0,0" scale=10 mesh="Carrier.mesh" />
    47                 <Model position="0,30,20" scale=10 mesh="pirate.mesh" roll="180" />
     47        <Model position="0,30,20" scale=10 mesh="pirate.mesh" roll="180" />
    4848        <Model position="-80,-30,20" scale=10 mesh="pirate.mesh" roll="180" />
    4949      </attached>
     
    5454        <Model position="0,0,0" scale=10 mesh="satellite.mesh" />
    5555        <MovableEntity position="-4,0,0" velocity="0,0,0" rotationaxis="0,0,1" rotationrate=50>
    56           <attached>
     56          <attached>
    5757            <Model position="4,0,0" scale=10 mesh="satellitedish.mesh"/>
    5858          </attached>
    59         </MovableEntity>
     59        </MovableEntity>
    6060        <ParticleEmitter pitch=-135 roll=30 position="-14, 3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
    6161        <ParticleEmitter pitch=135 roll=30 position="-14, 3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
  • code/trunk/data/levels/presentation09.oxw

    r5781 r6417  
    2424max = 20
    2525for i = 1, max, 1
    26 do 
     26do
    2727    x = math.sin(i/max*6)*40000
    2828    y = math.cos(i/max*6)*40000
     
    3030    ?>
    3131<?lua
    32 for k = 1, 25, 1 
     32for k = 1, 25, 1
    3333do
    3434j = math.random()
    3535?>
    36    
    37     <MovableEntity position="<?lua print(x + math.random() * 10000-2500) ?>,<?lua print(y + math.random() * 5000-2500) ?>,<?lua print(z + math.random() * 1000-500) ?>" <?lua if i == 5 then ?> collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> <?lua end ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>"> 
     36
     37    <MovableEntity position="<?lua print(x + math.random() * 10000-2500) ?>,<?lua print(y + math.random() * 5000-2500) ?>,<?lua print(z + math.random() * 1000-500) ?>" <?lua if i == 5 then ?> collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> <?lua end ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
    3838      <attached>
    3939        <Model position="0,0,0" scale=<?lua print(j * 10) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
     
    4343      </collisionShapes> <?lua end ?>
    4444    </MovableEntity>
    45 <?lua 
     45<?lua
    4646end
    4747?>
    4848<?lua end ?>
    4949    <Planet position="0,0,0" scale=10000 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="1,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
    50    
     50
    5151  </Scene>
    5252</Level>
  • code/trunk/data/levels/presentation09b.oxw

    r5929 r6417  
    8686      </controller>
    8787    </SpaceShip>
    88    
     88
    8989    <PickupSpawner item="JumpItem" triggerDistance="20" respawnTime="10000" position="-3800, 2500, 1500">
    9090        <attached>
     
    9393        </attached>
    9494    </PickupSpawner>
    95    
     95
    9696    <PickupSpawner item="HealthUsableItem" triggerDistance="20" respawnTime="10000" position="-4150,2750,1550">
    9797        <attached>
     
    100100        </attached>
    101101    </PickupSpawner>
    102    
     102
    103103    <PickupSpawner item="HealthImmediateItem" triggerDistance="20" respawnTime="3" position="2300, 4300, 2400">
    104104        <attached>
     
    121121
    122122<?lua
    123 for i = 1, 10, 1 
     123for i = 1, 10, 1
    124124do
    125125?>
     
    136136      </controller>
    137137    </SpaceShip>
    138 <?lua 
    139 end
    140 ?>
    141 
    142 <?lua
    143 for i = 1, 12, 1 
     138<?lua
     139end
     140?>
     141
     142<?lua
     143for i = 1, 12, 1
    144144do
    145145?>
     
    156156      </controller>
    157157    </SpaceShip>
    158 <?lua 
     158<?lua
    159159end
    160160?>
     
    173173
    174174<?lua
    175 for i = 1, 12, 1 
     175for i = 1, 12, 1
    176176do
    177177?>
     
    190190      </controller>
    191191    </SpaceShip>
    192 <?lua 
     192<?lua
    193193end
    194194?>
     
    320320
    321321<?lua
    322 for i = 1, 10, 1 
     322for i = 1, 10, 1
    323323do
    324324?>
     
    335335      </controller>
    336336    </SpaceShip>
    337 <?lua 
    338 end
    339 ?>
    340 
    341 <?lua
    342 for i = 1, 200, 1 
     337<?lua
     338end
     339?>
     340
     341<?lua
     342for i = 1, 200, 1
    343343do
    344344x = math.random() * 100  + (i-70) * 100
     
    347347s = math.random() * 60 + 30
    348348?>
    349    
    350     <MovableEntity position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.8 angularDamping=0.8 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 - 15) ?>"> 
     349
     350    <MovableEntity position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.8 angularDamping=0.8 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 - 15) ?>">
    351351      <attached>
    352352        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
    353353      </attached>
    354354    </MovableEntity>
    355 <?lua 
     355<?lua
    356356end
    357357?>
     
    363363    return table.getn(elements)
    364364end
    365 for i = 1, 150, 1 
     365for i = 1, 150, 1
    366366do
    367367x = math.random() * 750 - 4500
     
    370370e = math.floor(math.random()*elements.length()+1)
    371371?>
    372    
    373     <MovableEntity position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.8 angularDamping=0.8 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 - 15) ?>"> 
     372
     373    <MovableEntity position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.8 angularDamping=0.8 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 - 15) ?>">
    374374      <attached>
    375375        <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
    376376      </attached>
    377377    </MovableEntity>
    378 <?lua 
    379 end
    380 ?>
    381    
     378<?lua
     379end
     380?>
     381
    382382  </Scene>
    383383</Level>
  • code/trunk/data/levels/presentation_dm.oxw

    r5781 r6417  
    1818
    1919<?lua
    20 for i = 1, 10, 1 
     20for i = 1, 10, 1
    2121do ?>
    2222    <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
    23 <?lua 
     23<?lua
    2424end
    2525?>
     
    3535
    3636<?lua
    37 for i = 1, 100, 1 
     37for i = 1, 100, 1
    3838do
    3939j = math.random()
    4040?>
    41    
    42     <MovableEntity position="<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000 - 2000) ?>" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>"> 
     41
     42    <MovableEntity position="<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000 - 2000) ?>" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
    4343      <attached>
    4444        <Model position="0,0,0" scale=<?lua print(j * 10) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
     
    4848      </collisionShapes>
    4949    </MovableEntity>
    50 <?lua 
     50<?lua
    5151end
    5252?>
  • code/trunk/data/levels/princessaeryn.oxw

    r5929 r6417  
    66
    77<?lua
    8         dofile("includes/CuboidSpaceStation.lua")
     8    dofile("includes/CuboidSpaceStation.lua")
    99?>
    1010
  • code/trunk/data/levels/questsystem2.oxw

    • Property svn:eol-style set to native
    r5976 r6417  
    3737                    <QuestDescription title="The super Hint.3" description="Be proud of yourself.3" />
    3838                </QuestHint>
    39             </hints>   
     39            </hints>
    4040            <subquests>
    4141                <GlobalQuest id="e17f5245-f95b-44a8-b6cf-402274435ed4">
     
    215215max = 20
    216216for i = 1, max, 1
    217 do 
     217do
    218218    x = math.sin(i/max*6)*40000
    219219    y = math.cos(i/max*6)*40000
     
    221221    ?>
    222222<?lua
    223 for k = 1, 25, 1 
     223for k = 1, 25, 1
    224224do
    225225j = math.random()
    226226?>
    227    
    228     <MovableEntity position="<?lua print(x + math.random() * 10000-2500) ?>,<?lua print(y + math.random() * 5000-2500) ?>,<?lua print(z + math.random() * 1000-500) ?>" <?lua if i == 5 then ?> collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> <?lua end ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>"> 
     227
     228    <MovableEntity position="<?lua print(x + math.random() * 10000-2500) ?>,<?lua print(y + math.random() * 5000-2500) ?>,<?lua print(z + math.random() * 1000-500) ?>" <?lua if i == 5 then ?> collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> <?lua end ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
    229229      <attached>
    230230        <Model position="0,0,0" scale=<?lua print(j * 10) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
     
    234234      </collisionShapes> <?lua end ?>
    235235    </MovableEntity>
    236 <?lua 
     236<?lua
    237237end
    238238?>
    239239<?lua end ?>
    240240    <Planet position="0,0,0" scale=10000 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="1,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
    241    
     241
    242242  </Scene>
    243243</Level>
  • code/trunk/data/levels/teambasematchlevel.oxw

    r5781 r6417  
    4141        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>
    4242<?lua
    43 for i = 1, 10, 1 
     43for i = 1, 10, 1
    4444do ?>
    4545        <ParticleSpawner position="<?lua print(math.random() * 400 - 200) ?>,<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>" startdelay=<?lua print(math.random()) ?> source="Orxonox/BigExplosion1part1" lifetime=2.0 loop=0 autostart=0>
    4646          <events><spawn><EventListener event="base 1" /></spawn></events>
    4747        </ParticleSpawner>
    48 <?lua 
     48<?lua
    4949end
    5050?>
     
    7878        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>
    7979<?lua
    80 for i = 1, 10, 1 
     80for i = 1, 10, 1
    8181do ?>
    8282        <ParticleSpawner position="<?lua print(math.random() * 400 - 200) ?>,<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>" startdelay=<?lua print(math.random()) ?> source="Orxonox/BigExplosion1part1" lifetime=2.0 loop=0 autostart=0>
    8383          <events><spawn><EventListener event="base 2" /></spawn></events>
    8484        </ParticleSpawner>
    85 <?lua 
     85<?lua
    8686end
    8787?>
     
    115115        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>
    116116<?lua
    117 for i = 1, 10, 1 
     117for i = 1, 10, 1
    118118do ?>
    119119        <ParticleSpawner position="<?lua print(math.random() * 400 - 200) ?>,<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>" startdelay=<?lua print(math.random()) ?> source="Orxonox/BigExplosion1part1" lifetime=2.0 loop=0 autostart=0>
    120120          <events><spawn><EventListener event="base 3" /></spawn></events>
    121121        </ParticleSpawner>
    122 <?lua 
     122<?lua
    123123end
    124124?>
     
    151151        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>
    152152<?lua
    153 for i = 1, 10, 1 
     153for i = 1, 10, 1
    154154do ?>
    155155        <ParticleSpawner position="<?lua print(math.random() * 400 - 200) ?>,<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>" startdelay=<?lua print(math.random()) ?> source="Orxonox/BigExplosion1part1" lifetime=2.0 loop=0 autostart=0>
    156156          <events><spawn><EventListener event="base 4" /></spawn></events>
    157157        </ParticleSpawner>
    158 <?lua 
     158<?lua
    159159end
    160160?>
     
    188188        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>
    189189<?lua
    190 for i = 1, 10, 1 
     190for i = 1, 10, 1
    191191do ?>
    192192        <ParticleSpawner position="<?lua print(math.random() * 400 - 200) ?>,<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>" startdelay=<?lua print(math.random()) ?> source="Orxonox/BigExplosion1part1" lifetime=2.0 loop=0 autostart=0>
    193193          <events><spawn><EventListener event="base 5" /></spawn></events>
    194194        </ParticleSpawner>
    195 <?lua 
     195<?lua
    196196end
    197197?>
  • code/trunk/data/levels/templates/spaceship_assff.oxt

    r5781 r6417  
    6464   speedupdown    =  50
    6565
     66   defEngineSndNormal = "sounds/Engine_low.ogg"
     67   defEngineSndBoost = "sounds/Engine_high.ogg"
     68
    6669   accelerationfront     = 500
    6770   accelerationbrake     = 500
     
    7073   accelerationupdown    =  125
    7174  >
    72     <active>
     75    <EffectContainer condition="idle">
     76      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" loop=1 active=false/>
     77    </EffectContainer>
     78    <EffectContainer condition="not idle">
    7379      <FadingBillboard mainstate=activity active=false scale=0.1 position="0, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
    7480<!--
     
    7682      <Light mainstate=visibility position="-8, 0, 8" diffuse="0.3, 0.6, 1.0" specular="0.3, 0.6, 1.0" attenuation="600, 1.0, 0.007, 0.0002" type=point />
    7783-->
    78     </active>
    79     <forward>
     84    </EffectContainer>
     85    <EffectContainer condition="normal or brake">
     86
     87    </EffectContainer>
     88    <EffectContainer condition="normal or boost">
    8089      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    8190      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    82     </forward>
    83     <boost>
     91    </EffectContainer>
     92    <EffectContainer condition="boost">
    8493      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    8594      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    86     </boost>
    87     <brake>
     95    </EffectContainer>
     96    <EffectContainer condition="brake">
    8897      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
    8998      <FadingBillboard mainstate=activity active=false scale=0.3 position="-8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
    9099      <FadingBillboard mainstate=activity active=false scale=0.15 position=" 8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
    91100      <FadingBillboard mainstate=activity active=false scale=0.15 position="-8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
    92     </brake>
     101    </EffectContainer>
    93102  </MultiStateEngine>
    94103</Template>
  • code/trunk/data/levels/templates/spaceship_ghost.oxt

    • Property svn:eol-style set to native
    r5989 r6417  
    1212   initialhealth     = 100
    1313
    14    primaryThrust     = 100;
     14   primaryThrust     = 600;
    1515   auxilaryThrust    = 30;
    1616   rotationThrust    = 25;
     
    3333      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
    3434    </collisionShapes>
    35 
     35<?lua
     36  include("includes/weaponsettings_ghost.oxi")
     37?>
    3638  </SpaceShip>
    3739</Template>
     
    4446      <CameraPosition position="0,50,200" drag=true mouselook=true />
    4547    </camerapositions>
    46 
    47 <?lua
    48   include("includes/weaponsettings_ghost.oxi")
    49 ?>
    50 
    5148  </SpaceShip>
    5249</Template>
     
    5653   boostfactor    = 2
    5754
    58    speedfront     = 150
     55   speedfront     = 600
    5956   speedback      =  50
    6057   speedleftright =  50
    6158   speedupdown    =  50
    6259
    63    accelerationfront     = 300
     60   accelerationfront     = 700
    6461   accelerationbrake     = 300
    6562   accelerationback      =  100
     
    6764   accelerationupdown    =  100
    6865  >
    69 
    70 
    71     <forward>
    72       <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 6.06, 3.66, 9.6" colour="1, 1, 1, 0.4" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    73       <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-6.06, 3.66, 9.6" colour="1, 1, 1, 0.4" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    74       <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 6.06, 5.66, 9.6" colour="1, 1, 1, 0.4" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    75       <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-6.06, 5.66, 9.6" colour="1, 1, 1, 0.4" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    76       <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 6.86, 4.66, 9.6" colour="1, 1, 1, 0.4" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    77       <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-6.86, 4.66, 9.6" colour="1, 1, 1, 0.4" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    78     </forward>
    79     <boost>
    80       <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 6.06, 5.66, 11.6" colour="0.5, 0.85, 0.5, 0.1" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    81       <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-6.06, 5.66, 11.6" colour="0.5, 0.85, 0.5, 0.1" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    82       <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 6.06, 3.66, 11.6" colour="0.5, 0.85, 0.5, 0.1" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    83       <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-6.06, 3.66, 11.6" colour="0.5, 0.85, 0.5, 0.1" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    84       <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 6.86, 4.66, 11.6" colour="0.5, 0.85, 0.5, 0.1" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    85       <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-6.86, 4.66, 11.6" colour="0.5, 0.85, 0.5, 0.1" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    86     </boost>
    87   </MultiStateEngine>
     66    <EffectContainer condition="normal or boost">
     67      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 3, 6" colour="0.0, 0.0, 0.0, 0.5" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
     68      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 3, 6" colour="0.0, 0.0, 0.0, 0.5" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
     69    </EffectContainer>
     70    <EffectContainer condition="boost">
     71      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 3, 6" colour="0.0, 0.0, 0.0, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
     72      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 3, 6" colour="0.0, 0.0, 0.0, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
     73    </EffectContainer>
     74    <EffectContainer condition="not idle">
     75      <Backlight mainstate=activity active=false scale=0.4 position="7.6, 3, 6" colour="1, 1, 1, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
     76      <Backlight mainstate=activity active=false scale=0.4 position="-7.6, 3, 6" colour="1, 1, 1, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
     77    </EffectContainer>
     78    <EffectContainer condition="brake">
     79      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 8, 0, 6" colour="0.2, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
     80      <FadingBillboard mainstate=activity active=false scale=0.3 position="-8, 0, 6" colour="0.2, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
     81    </EffectContainer>
     82</MultiStateEngine>
    8883</Template>
    8984
  • code/trunk/data/levels/test_ghost.oxw

    • Property svn:eol-style set to native
    r5989 r6417  
    2424max = 20
    2525for i = 1, max, 1
    26 do 
     26do
    2727    x = math.sin(i/max*6)*40000
    2828    y = math.cos(i/max*6)*40000
     
    3030    ?>
    3131<?lua
    32 for k = 1, 25, 1 
     32for k = 1, 25, 1
    3333do
    3434j = math.random()
    3535?>
    36    
    37     <MovableEntity position="<?lua print(x + math.random() * 10000-2500) ?>,<?lua print(y + math.random() * 5000-2500) ?>,<?lua print(z + math.random() * 1000-500) ?>" <?lua if i == 5 then ?> collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> <?lua end ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>"> 
     36
     37    <MovableEntity position="<?lua print(x + math.random() * 10000-2500) ?>,<?lua print(y + math.random() * 5000-2500) ?>,<?lua print(z + math.random() * 1000-500) ?>" <?lua if i == 5 then ?> collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> <?lua end ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
    3838      <attached>
    3939        <Model position="0,0,0" scale=<?lua print(j * 10) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
     
    4343      </collisionShapes> <?lua end ?>
    4444    </MovableEntity>
    45 <?lua 
     45<?lua
    4646end
    4747?>
    4848<?lua end ?>
    4949    <Planet position="0,0,0" scale=10000 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="1,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
    50    
     50
    5151  </Scene>
    5252</Level>
  • code/trunk/data/lua/LuaStateInit.lua

    r5695 r6417  
    1515
    1616-- Redirect dofile in order to load with the resource manager
    17 -- Note: The function does not behave exactly like LuaState::doFile because the
    18 --       default argument here for the group is not "General" but
    19 --       "NoResourceGroupProvided". This resolves to the resource group used to
    20 --       do the current file.
    21 doFile = function(filename, resourceGroup)
    22   local bSearchOtherPaths = (resourceGroup == nil) or false
    23   resourceGroup = resourceGroup or "NoResourceGroupProvided"
    24   luaState:doFile(filename, resourceGroup, bSearchOtherPaths)
     17doFile = function(filename)
     18  luaState:doFile(filename)
    2519  -- Required because the C++ function cannot return whatever might be on the stack
    26   return LuaStateReturnValue
     20  return LuaStateReturnValue -- C-injected global variable
    2721end
    2822original_dofile = dofile
     
    3125-- Create includeFile function that preparses the file according
    3226-- to a function provided to the LuaState constructor (in C++)
    33 -- Note: See the same notes as for doFile
    34 include = function(filename, resourceGroup)
    35   local bSearchOtherPaths = (resourceGroup == nil) or false
    36   resourceGroup = resourceGroup or "NoResourceGroupProvided"
    37   luaState:includeFile(filename, resourceGroup, bSearchOtherPaths)
     27include = function(filename)
     28  luaState:includeFile(filename)
    3829  -- Required because the C++ function cannot return whatever might be on the stack
    39   return LuaStateReturnValue
     30  return LuaStateReturnValue -- C-injected global variable
    4031end
    4132
    4233-- Replace require function with almost similar behaviour
    43 -- The difference is that you need to provide a resource group
    44 -- Default value there is the current one (if present) or else "General"
    45 -- But the loaded modules are then stored with only with the name (where name has no .lua extension)
    46 -- CAUTION: That also means that you need to take care of conflicting filenames among groups
    47 -- Furthermore the moduleName parameters is appended with the .lua extension when looking for the file
     34-- The loaded modules are then stored with their names (where name has no .lua extension)
     35-- Furthermore the ".lua" extension is appended to the moduleName parameter when looking for the file
    4836old_require = require
    49 require = function(moduleName, resourceGroup)
    50   local bSearchOtherPaths = (resourceGroup == nil) or false
    51   resourceGroup = resourceGroup or "NoResourceGroupProvided"
    52   if not luaState:fileExists(moduleName .. ".lua", resourceGroup, bSearchOtherPaths) then
     37require = function(moduleName)
     38  if not luaState:fileExists(moduleName .. ".lua") then
    5339    return nil
    5440  end
     
    6046    _REQUIREDNAME_OLD = _REQUIREDNAME
    6147    _REQUIREDNAME = moduleName
    62     luaState:doFile(moduleName .. ".lua", resourceGroup, bSearchOtherPaths)
     48    luaState:doFile(moduleName .. ".lua")
    6349    _LOADED[moduleName] = LuaStateReturnValue or true
    6450    -- restore old value
     
    6753  return _LOADED[moduleName]
    6854end
     55
     56-- Convenience function for console commands
     57orxonox.execute = function(command)
     58  orxonox.CommandExecutor:execute(command)
     59end
  • code/trunk/data/overlays/OrxonoxLoading.overlay

    r5781 r6417  
    1111      material Orxonox/LoadingScreenSample
    1212   }
    13 } 
     13}
  • code/trunk/data/overlays/debug.oxo

    r5781 r6417  
    3535   textsize = 0.03
    3636  />
    37  
     37
    3838</OverlayGroup>
    3939
  • code/trunk/data/overlays/stats.oxo

    r5781 r6417  
    66       name      = "Title"
    77       position  = "0.79, 0.19"
    8        pickpoint = "1, 1"       
     8       pickpoint = "1, 1"
    99       font      = "Monofur"
    1010       caption   = "Scoreboard"
     
    1212       textsize  = 0.04
    1313      /-->
    14      
     14
    1515      <OverlayText
    1616       name      = "descr1"
     
    2525       name      = "descr2"
    2626       position  = "0.6, 0.20"
    27        pickpoint = "0, 1"       
     27       pickpoint = "0, 1"
    2828       font      = "Monofur"
    2929       caption   = "score"
     
    3434       name      = "descr3"
    3535       position  = "0.8, 0.20"
    36        pickpoint = "0, 1"       
     36       pickpoint = "0, 1"
    3737       font      = "Monofur"
    3838       caption   = "deaths"
     
    4040       textsize  = 0.04
    4141      />
    42      
     42
    4343      <!--Stats
    4444       name     = "Statistics"
Note: See TracChangeset for help on using the changeset viewer.