Changeset 4867 for data/trunk/scripts/moonstation/intro.lua
- Timestamp:
- Jun 7, 2007, 5:29:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/trunk/scripts/moonstation/intro.lua
r4850 r4867 4 4 thisscript:addObject("NPC", "IntroSpaceship") 5 5 thisscript:addObjectAsName("GameWorld", "Moon Station", "gameWorld") -- =gameTitle 6 7 thisscript:registerClass("Explosion") 8 explosion = Explosion() 6 9 7 10 -- Initialisation … … 18 21 triggerMoonstation:setTarget("CameraIntro") 19 22 triggerMoonstation:setRadius(150) 20 triggerMoonstation:setDebugDraw(true)23 --triggerMoonstation:setDebugDraw(true) 21 24 22 -- Camera2 MoonstationCenter25 -- Camera2Spaceship 23 26 triggerShowCrash = SpaceTrigger() 24 27 triggerShowCrash:setScript("intro.lua") … … 27 30 triggerShowCrash:setTarget("CameraIntro") 28 31 triggerShowCrash:setRadius(200) 29 triggerShowCrash:setDebugDraw(true) 32 --triggerShowCrash:setDebugDraw(true) 33 34 -- Explode 35 triggerShowCrash = SpaceTrigger() 36 triggerShowCrash:setScript("intro.lua") 37 triggerShowCrash:setFunction("explodeSpaceship") 38 triggerShowCrash:setAbsCoor(840.948486, 175.905289, -175.412460) 39 triggerShowCrash:setTarget("IntroSpaceship") 40 triggerShowCrash:setRadius(250) 41 --triggerShowCrash:setDebugDraw(true) 30 42 31 43 --hide crashing ship … … 36 48 triggerShowCrash:setTarget("IntroSpaceship") 37 49 triggerShowCrash:setRadius(60) 38 triggerShowCrash:setDebugDraw(true)50 --triggerShowCrash:setDebugDraw(true) 39 51 40 52 -- End of Intro … … 45 57 triggerEndIntro:setTarget("CameraIntro") 46 58 triggerEndIntro:setRadius(110) 47 triggerEndIntro:setDebugDraw(true)59 --triggerEndIntro:setDebugDraw(true) 48 60 49 61 … … 52 64 introRunning = false 53 65 spaceshipCrashDelay = 2 66 boomSize = 100 67 pauseBurn = 0 68 exploded = false 54 69 55 70 -- init function … … 79 94 if spaceshipCrashDelay<0 then --BUG this is a little hack cause if the target is mooving the camera switch would be imediate 80 95 IntroSpaceship:pause(false) 81 return true 96 if pauseBurn==0 then 97 pauseBurn = 5 98 explosion:setAbsCoor(IntroSpaceship:getAbsCoorX(),IntroSpaceship:getAbsCoorY(),IntroSpaceship:getAbsCoorZ()) 99 explosion:explode(math.random()*50+50, math.random()*50+50, math.random()*50+50) 100 if exploded then 101 return true 102 end 103 else 104 pauseBurn = pauseBurn - 1 105 end 106 return false 82 107 end 83 108 return false 84 109 end 85 110 111 function explodeSpaceship(timestep) 112 --gameWorld:showText("BOOOOOOOOOOOOOOOOM"); 113 explosion:setAbsCoor(1003, 226, -102) 114 explosion:explode(boomSize,boomSize,boomSize) 115 boomSize = boomSize + 10 116 if boomSize == 600 then 117 return true 118 end 119 exploded = true 120 return false 121 end 122 86 123 function hideCrashingSpaceship(timestep) 87 --IntroSpaceship:setVisibility(false) --BUG affects all npc88 124 IntroSpaceship:pause(true) 125 IntroSpaceship:setVisibility(false) 89 126 return true 90 127 end
Note: See TracChangeset
for help on using the changeset viewer.