Changeset 4902 for data/trunk/scripts/vertical_scroller
- Timestamp:
- Jun 19, 2007, 5:20:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/trunk/scripts/vertical_scroller/vs1.lua
r4899 r4902 1 --register classes 2 thisscript:registerClass("Explosion") 1 3 -- Get objects from orxonox 2 4 thisscript:addObject("SpaceShip", "Player") … … 6 8 triggerFadeOut = SpaceTrigger() 7 9 triggerFadeOut:setScript("vs1.lua") 8 triggerFadeOut:setFunction(" fadeOut")9 triggerFadeOut:setRadius(2 50)10 triggerFadeOut:setFunction("explodeSpaceship") 11 triggerFadeOut:setRadius(280) 10 12 triggerFadeOut:setTarget("Player") 11 13 triggerFadeOut:setAbsCoor(3610, 116, -656) 12 14 triggerFadeOut:setDebugDraw(true) 15 16 triggerSwitchCam = SpaceTrigger() 17 triggerSwitchCam:setScript("vs1.lua") 18 triggerSwitchCam:setFunction("switchCam") 19 triggerSwitchCam:setRadius(300) 20 triggerSwitchCam:setTarget("Player") 21 triggerSwitchCam:setAbsCoor(3610, 116, -656) 22 triggerSwitchCam:setDebugDraw(true) 13 23 14 24 triggerEndLevel = TimeTrigger() … … 17 27 triggerEndLevel:setDelay(5) 18 28 19 teststring = "asdf"; 29 --initialisation 30 explosion = Explosion() 31 cameraManager:changeTarget("cameraOne","SpaceShip", "Player") 20 32 21 function fadeOut(timestep) 22 cameraManager:toggleFade() 23 print(teststring) 24 triggerEndLevel:start() 25 return true 26 end 33 -- globals 34 boomSize = 100 35 27 36 28 37 function changeLevel(timestep) 29 print("changelvl now\n\n\n\n\n\n")30 38 gameWorld:setNextStoryName("Moonstation") 31 39 gameWorld:stop() 32 40 return true 33 41 end 42 43 44 function explodeSpaceship(timestep) 45 explosion:setAbsCoor(Player:getAbsCoorX(),Player:getAbsCoorY(),Player:getAbsCoorZ()) 46 explosion:explode(boomSize,boomSize,boomSize) 47 boomSize = boomSize + 10 48 if boomSize == 600 then 49 triggerEndLevel:start() 50 cameraManager:toggleFade() 51 return true 52 end 53 return false 54 end 55 56 function switchCam(timestep) 57 cameraManager:setCam("cameraOne") 58 cameraManager:jumpCurrCam(3604.608398, 155.705444, -312.326019) 59 return true 60 end
Note: See TracChangeset
for help on using the changeset viewer.