1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
FirstZone = {}
SecondZone = {}
ThirdZone = {}
FourthZone = {}
FifthZone = {}
TutorialStage = 0
Zone2Time = 0
Zone3Time = 0
Zone4Time = 0
function Tick()
-- Stages
if TutorialStage == 1 then
if Game.GetTime() > 6 then
TutorialStage = 2
Game.Message("The first jump you're going to perform is very easy.")
end
elseif TutorialStage == 2 then
if Game.GetTime() > 10 then
TutorialStage = 3
Game.Message("Drive to the left, accelerate, and when you are in\nthe air, try to adjust your attitude with the left\nand right arrow keys, so you'll land on your wheels.")
end
elseif TutorialStage == 4 then
if (Game.GetTime() - Zone2Time) > 4 then
TutorialStage = 5
Game.ClearMessages()
Game.Message("The next jump is a bit trickier. You'll need all the\nspeed you can get to reach the other side...")
end
elseif TutorialStage == 7 then
if (Game.GetTime() - Zone4Time) > 4 then
TutorialStage = 8
Game.ClearMessages()
Game.Message("Now for the most difficult jump in this tutorial!")
end
elseif TutorialStage == 8 then
if (Game.GetTime() - Zone4Time) > 9 then
TutorialStage = 9
Game.ClearMessages()
Game.Message("This time, speed alone won't do the job...")
end
elseif TutorialStage == 9 then
if (Game.GetTime() - Zone4Time) > 14 then
TutorialStage = 10
Game.ClearMessages()
Game.Message("Here's the plan:\nAgain, you'll have to obtain maximum speed, but when\nyou reach the edge of the jump, pull the bike's front\nwheel up.")
end
elseif TutorialStage == 10 then
if (Game.GetTime() - Zone4Time) > 24 then
TutorialStage = 11
Game.ClearMessages()
Game.Message("That will cause the rear suspension to increase the\nlength of the jump.\nTry it...")
end
end
return true
end
function OnLoad()
return true
end
function FirstZone.OnEnter()
if TutorialStage < 1 then
-- First part of tutorial...
TutorialStage = 1
ChangeDirControl = Game.GetKeyByAction("ChangeDir")
Game.ClearMessages()
Game.Message("This tutorial will teach you the basics of jumping.")
if ChangeDirControl == "?" then
-- Well, something is wrong, don't say anything :)
else
Game.Message("Remember you can turn around your bike\nby pressing :", ChangeDirControl)
end
end
end
function FirstZone.OnLeave()
end
function SecondZone.OnEnter()
if TutorialStage <= 3 then
-- Second part of tutorial...
TutorialStage = 4
Zone2Time = Game.GetTime()
Game.ClearMessages()
Game.Message("That was pretty easy, right?")
end
end
function SecondZone.OnLeave()
end
function ThirdZone.OnEnter()
if TutorialStage <= 5 then
-- Third part of tutorial...
TutorialStage = 6
Zone3Time = Game.GetTime()
Game.ClearMessages()
Game.Message("Accelerate NOW! Obtain maximum speed, and try to\nkeep the front wheel at the ground...")
end
end
function ThirdZone.OnLeave()
end
function FourthZone.OnEnter()
if TutorialStage <= 6 then
-- Fourth part of tutorial...
TutorialStage = 7
Zone4Time = Game.GetTime()
Game.ClearMessages()
Game.Message("Nice jump there! :)")
end
end
function FourthZone.OnLeave()
end
function FifthZone.OnEnter()
if TutorialStage <= 11 then
-- Last part of tutorial...
TutorialStage = 12
Game.ClearMessages()
Game.Message("Congrats, you're now a master jumper!")
end
end
function FifthZone.OnLeave()
end
|