Changeset 4867 for data/trunk/scripts
- Timestamp:
- Jun 7, 2007, 5:29:27 PM (18 years ago)
- Location:
- data/trunk/scripts/moonstation
- Files:
-
- 1 added
- 2 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 -
data/trunk/scripts/moonstation/quest.lua
r4850 r4867 13 13 triggerGetEnergyQuest:setTarget("Player") 14 14 triggerGetEnergyQuest:setRadius(160) 15 triggerGetEnergyQuest:setDebugDraw(true)15 --triggerGetEnergyQuest:setDebugDraw(true) 16 16 17 17 --activate energy - finish energyQuest 18 triggerFinishEnergyQuest = SpaceTrigger()18 triggerFinishEnergyQuest = ActionTrigger() 19 19 triggerFinishEnergyQuest:setScript("quest.lua") 20 20 triggerFinishEnergyQuest:setFunction("finishEnergyQuest") 21 21 triggerFinishEnergyQuest:setAbsCoor(346.239166, 482.885010, -160.825775) 22 22 triggerFinishEnergyQuest:setTarget("Player") 23 triggerFinishEnergyQuest:setRadius(30) 24 triggerFinishEnergyQuest:setDebugDraw(true) 23 triggerFinishEnergyQuest:setRadius(35) 24 --triggerFinishEnergyQuest:setDebugDraw(true) 25 26 --finish quest Info 27 triggerFinishEnergyQuest = SpaceTrigger() 28 triggerFinishEnergyQuest:setScript("quest.lua") 29 triggerFinishEnergyQuest:setFunction("finishEnergyQuestInfo") 30 triggerFinishEnergyQuest:setAbsCoor(346.239166, 482.885010, -160.825775) 31 triggerFinishEnergyQuest:setTarget("Player") 32 triggerFinishEnergyQuest:setRadius(35) 33 --triggerFinishEnergyQuest:setDebugDraw(true) 25 34 26 35 --HINT Broken station -> find another way … … 31 40 triggerFinishEnergyQuest:setTarget("Player") 32 41 triggerFinishEnergyQuest:setRadius(85) 33 triggerFinishEnergyQuest:setDebugDraw(true)42 --triggerFinishEnergyQuest:setDebugDraw(true) 34 43 35 44 --HINT find action button … … 68 77 end 69 78 79 function finishEnergyQuestInfo(timestep) 80 gameWorld:showText("Hint: you can use the Energyswitch by Pressing U") 81 return true 82 end 83 70 84 function tick(timestep) 71 85 --io.write("tick called \n")
Note: See TracChangeset
for help on using the changeset viewer.