Changeset 4561
- Timestamp:
- Jan 27, 2007, 5:14:51 PM (18 years ago)
- Location:
- data/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
data/trunk/levels/sp_cutscene_intro.oxw
r4557 r4561 21 21 </SkyBox> 22 22 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> 23 29 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> 31 36 32 37 <Planet> … … 76 81 77 82 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> 80 102 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> 93 109 94 110 <Music>music/tower01.ogg</Music> -
data/trunk/scripts/cutscene/cutscene.lua
r4557 r4561 1 -- Main trigger 1 2 trigger = ScriptTrigger() -- Create the trigger 2 3 trigger:setScript("cutscene.lua") -- Tell the trigger which script to call 3 4 trigger:setFunction("tick") -- Tell the trigger which scriptfunction to call 4 trigger:setActiveOnCreation(true) 5 trigger:setActiveOnCreation(true) 6 7 -- Cameraswitchone 8 triggerOne = ScriptTrigger() 9 triggerOne:setScript("cutscene.lua") 10 triggerOne:setFunction("switchCamTargetToEarth") 11 triggerOne:setAbsCoor(250, 0 , 0) 12 triggerOne:setTarget("CameraOne") 13 triggerOne:setRadius(1) 14 triggerOne:setDebugDraw(true) 15 16 17 -- Cameraswitchtwo 18 triggerTwo = ScriptTrigger() 19 triggerTwo:setScript("cutscene.lua") 20 triggerTwo:setFunction("switchCamToSpaceship") 21 triggerTwo:setAbsCoor(250, 0 , 0) 22 triggerTwo:setTarget("shutleOne") 23 triggerTwo:setRadius(1) 24 triggerTwo:setDebugDraw(true) 25 26 -- Cameraswitchthree 27 triggerThree = ScriptTrigger() 28 triggerThree:setScript("cutscene.lua") 29 triggerThree:setFunction("switchCamToStation") 30 triggerThree:setAbsCoor(250, 0 , 0) 31 triggerThree:setTarget("CameraTwo") 32 triggerThree:setRadius(1) 33 triggerThree:setDebugDraw(true) 34 5 35 6 36 -- Get objects from orxonox 7 37 thisscript:addObject("CameraMan", "cameraManager") 38 thisscript:addObject("NPC", "shutleOne") 39 40 -- Global Variables 41 time = 0 8 42 9 43 10 time = 0 11 cameraSwitched = false 44 -- Switch cam functions 45 function switchCamTargetToEarth(timestep) 46 cameraManager:changeCurrTarget("Planet", "Earth") 47 return true 48 end 49 50 function switchCamToSpaceship(timestep) 51 cameraManager:atachCurrCameraToWorldEntity( "NPC", "shutleOne") 52 return true 53 end 54 55 function switchCamToStation(timestep) 56 cameraManager:atachCurrCameraToWorldEntity("Building", "zhara") 57 return true 58 end 59 12 60 13 61 -- THE tick function … … 15 63 function tick(timestep) 16 64 time = time + timestep 65 cameraManager:setCam("CameraOne") 66 --cameraManager:atachCurrCameraToWorldEntity( "NPC", "shutleOne") 17 67 18 cameraManager:changeTarget( "CameraOne", "Planet", "Moon")19 cameraManager:setCam("CameraOne")20 68 cameraSwitched = true 21 69 22 70 if time > 4 then 23 cameraManager:togglFade()71 --cameraManager:togglFade() 24 72 return true 25 73 end
Note: See TracChangeset
for help on using the changeset viewer.