Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4561


Ignore:
Timestamp:
Jan 27, 2007, 5:14:51 PM (18 years ago)
Author:
snellen
Message:

custscene…

Location:
data/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • data/trunk/levels/sp_cutscene_intro.oxw

    r4557 r4561  
    2121        </SkyBox>
    2222
     23        <NPC>
     24          <name>shutleOne</name>
     25          <model>models/spaceships/noxon_spaceship_fighter.obj</model>
     26          <abs-coor>0, 0, 1000</abs-coor>
     27          <abs-dir> 1.5,0,1,0 </abs-dir>
     28        </NPC>
    2329
    24         <Planet>
    25           <name>Earth</name>
    26           <size>140</size>
    27           <abs-coor>0, 0, -200</abs-coor>
    28           <texture>textures/planets/mars.png</texture>
    29         </Planet>
    30 
     30        <Planet>
     31            <name>Earth</name>
     32            <size>140</size>
     33            <abs-coor>0, 0, -200</abs-coor>
     34            <texture>textures/planets/mars.png</texture>
     35          </Planet>
    3136
    3237        <Planet>
     
    7681
    7782
    78    <CameraMan>
    79     <name> cameraManager </name>
     83  <CameraMan>
     84   <name> cameraManager </name>
     85   <Cameras>
     86    <Camera>
     87     <name> CameraOne </name>
     88     <abs-coor>500,0,0</abs-coor>
     89     <Track>
     90       <mode>1</mode>
     91       <speed>1</speed>
     92       <addPoint>500,0,0</addPoint>
     93       <addPoint>450,0,0</addPoint>
     94       <addPoint>350,0,0</addPoint>
     95       <addPoint>300,0,0</addPoint>
     96       <addPoint>250,0,0</addPoint>
     97       <addPoint>200,0,0</addPoint>
     98       <addPoint>150,0,0</addPoint>
     99       
     100     </Track>
     101    </Camera>
    80102
    81      <Camera>
    82       <name> CameraOne </name>
    83       <abs-coor>500,0,0</abs-coor>
    84       <Track>
    85         <mode>1</mode>
    86         <speed>1</speed>
    87         <addPoint>500,0,0</addPoint>
    88         <addPoint>400,0,200</addPoint>
    89       </Track>
    90      </Camera>
    91 
    92    </CameraMan>
     103    <Camera>
     104     <name> CameraTwo </name>
     105     <abs-coor>500,0,0</abs-coor>
     106    </Camera>
     107   </Cameras>
     108  </CameraMan>
    93109
    94110  <Music>music/tower01.ogg</Music>
  • data/trunk/scripts/cutscene/cutscene.lua

    r4557 r4561  
     1-- Main trigger
    12trigger = ScriptTrigger()                     -- Create the trigger
    23trigger:setScript("cutscene.lua")             -- Tell the trigger which script to call
    34trigger:setFunction("tick")                   -- Tell the trigger which scriptfunction to call
    4 trigger:setActiveOnCreation(true)             
     5trigger:setActiveOnCreation(true)     
     6
     7-- Cameraswitchone
     8triggerOne = ScriptTrigger()
     9triggerOne:setScript("cutscene.lua")
     10triggerOne:setFunction("switchCamTargetToEarth")
     11triggerOne:setAbsCoor(250, 0 , 0)
     12triggerOne:setTarget("CameraOne")
     13triggerOne:setRadius(1)
     14triggerOne:setDebugDraw(true)
     15
     16
     17-- Cameraswitchtwo
     18triggerTwo = ScriptTrigger()
     19triggerTwo:setScript("cutscene.lua")
     20triggerTwo:setFunction("switchCamToSpaceship")
     21triggerTwo:setAbsCoor(250, 0 , 0)
     22triggerTwo:setTarget("shutleOne")
     23triggerTwo:setRadius(1)
     24triggerTwo:setDebugDraw(true) 
     25
     26-- Cameraswitchthree
     27triggerThree = ScriptTrigger()
     28triggerThree:setScript("cutscene.lua")
     29triggerThree:setFunction("switchCamToStation")
     30triggerThree:setAbsCoor(250, 0 , 0)
     31triggerThree:setTarget("CameraTwo")
     32triggerThree:setRadius(1)
     33triggerThree:setDebugDraw(true) 
     34
    535 
    636-- Get objects from orxonox
    737thisscript:addObject("CameraMan", "cameraManager")
     38thisscript:addObject("NPC", "shutleOne")
     39
     40-- Global Variables
     41time = 0
    842
    943
    10 time = 0
    11 cameraSwitched = false
     44-- Switch cam functions
     45function switchCamTargetToEarth(timestep)
     46cameraManager:changeCurrTarget("Planet", "Earth")
     47return true
     48end
     49
     50function switchCamToSpaceship(timestep)
     51cameraManager:atachCurrCameraToWorldEntity( "NPC", "shutleOne")
     52return true
     53end
     54
     55function switchCamToStation(timestep)
     56cameraManager:atachCurrCameraToWorldEntity("Building", "zhara")
     57return true
     58end
     59
    1260
    1361-- THE tick function
     
    1563function tick(timestep)
    1664time = time + timestep
     65cameraManager:setCam("CameraOne")
     66--cameraManager:atachCurrCameraToWorldEntity( "NPC", "shutleOne")
    1767
    18 cameraManager:changeTarget( "CameraOne", "Planet", "Moon")
    19 cameraManager:setCam("CameraOne")
    2068cameraSwitched = true
    2169
    2270if time > 4 then
    23 cameraManager:togglFade()
     71--cameraManager:togglFade()
    2472return true
    2573end
Note: See TracChangeset for help on using the changeset viewer.