home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / BeaverFever.dxr / 00030.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  3.3 KB  |  77 lines

  1. on exitFrame me
  2.   global readySetGoDelay, playerPosition, playerData, riverOffset, playerThrottle, pDrift, pSpeed, scrollingSpeed, driftLoc, splashData, splashCycle, splashRateDelay, playerTotalScore, playerLevelScore
  3.   if pDrift > 0 then
  4.     pSpeed = pSpeed - 0.10000000000000001
  5.   else
  6.     pSpeed = pSpeed + 0.10000000000000001
  7.   end if
  8.   pDrift = pDrift + pSpeed
  9.   driftLoc = point(0, 0)
  10.   playerPosition = integer(pDrift)
  11.   playerData[2] = point(2000, 3000)
  12.   drawShore()
  13.   set the loc of sprite 87 to (playerData[2] / 10) + point(riverOffset, 0)
  14.   if splashRateDelay <= 2 then
  15.     splashRateDelay = splashRateDelay + 1
  16.   else
  17.     splashRateDelay = splashRateDelay - 1
  18.     splashCycle = splashCycle + 1
  19.     if splashCycle > count(splashData) then
  20.       splashCycle = 1
  21.     end if
  22.     splashData[splashCycle][1] = 0
  23.     shipAngle = 0
  24.     playerThrottle = 0
  25.     locY = cos(shipAngle * PI / 180) * -(-550)
  26.     locX = sin(shipAngle * PI / 180) * -550
  27.     splashData[splashCycle][2] = playerData[2] + point(locX, locY - 300)
  28.   end if
  29.   repeat with whichSplash = 1 to count(splashData)
  30.     if splashData[whichSplash][1] >= 20 then
  31.       set the loc of sprite (130 + whichSplash) to point(-50, -50)
  32.     else
  33.       splashData[whichSplash][2] = splashData[whichSplash][2] + point(0, playerThrottle)
  34.       splashData[whichSplash][1] = splashData[whichSplash][1] + 1
  35.       set the member of sprite (130 + whichSplash) to "splash " & string(splashData[whichSplash][1] / 4)
  36.       sprite(130 + whichSplash).flipH = random(2) - 1
  37.       sprite(130 + whichSplash).locZ = 55 - splashData[whichSplash][1]
  38.       set the loc of sprite (130 + whichSplash) to (splashData[whichSplash][2] / 10) + point(riverOffset, 0)
  39.     end if
  40.     set the loc of sprite (130 + whichSplash) to point(-50, -50)
  41.   end repeat
  42.   finalScore = playerTotalScore + playerLevelScore
  43.   if finalScore < 10 then
  44.     set the member of sprite 217 to "Digit empty"
  45.     set the member of sprite 218 to "Digit empty"
  46.     set the member of sprite 219 to "Digit empty"
  47.     set the member of sprite 220 to "Digit " & string(char 1 of string(finalScore))
  48.   else
  49.     if finalScore < 100 then
  50.       set the member of sprite 217 to "Digit empty"
  51.       set the member of sprite 218 to "Digit empty"
  52.       set the member of sprite 219 to "Digit " & string(char 1 of string(finalScore))
  53.       set the member of sprite 220 to "Digit " & string(char 2 of string(finalScore))
  54.     else
  55.       if finalScore < 1000 then
  56.         set the member of sprite 217 to "Digit empty"
  57.         set the member of sprite 218 to "Digit " & string(char 1 of string(finalScore))
  58.         set the member of sprite 219 to "Digit " & string(char 2 of string(finalScore))
  59.         set the member of sprite 220 to "Digit " & string(char 3 of string(finalScore))
  60.       else
  61.         if finalScore < 10000 then
  62.           set the member of sprite 217 to "Digit " & string(char 1 of string(finalScore))
  63.           set the member of sprite 218 to "Digit " & string(char 2 of string(finalScore))
  64.           set the member of sprite 219 to "Digit " & string(char 3 of string(finalScore))
  65.           set the member of sprite 220 to "Digit " & string(char 4 of string(finalScore))
  66.         end if
  67.       end if
  68.     end if
  69.   end if
  70.   sprite(700).visible = 0
  71.   if sprite(214).playing = 0 then
  72.     go(12)
  73.   else
  74.     go(the frame)
  75.   end if
  76. end
  77.