home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / TroyReturns.dxr / 00001.ls next >
Encoding:
Text File  |  2002-01-31  |  5.3 KB  |  130 lines

  1. on exitFrame me
  2.   global anchorViewPoint, rumbleOffset, playerScore, locksOpened, maxLocks, lockedOffReigon, playerlevel, portalIndex, playerHealth, levelScore, bossIntro, thoughtBaloonVisible, playerLocData, playerViewpoint, paralaxBgData, animDelay, animNumber, monsterHitArea, playerInventory, viewChangerooRecord, screenTileSize, lastTimerCheck, totalFrames, hitIndicatorDelay, hitIndicatorLength, bubbleData, killOnlyOnce
  3.   rumbleOffset = point(0, 0)
  4.   playerViewpoint = point(600, 25)
  5.   anchorViewPoint = point(600, 25)
  6.   initializeterrainSet()
  7.   initializeConstants()
  8.   initializeScreen()
  9.   initializeMonsters()
  10.   initializePickups()
  11.   initializeplayer()
  12.   initializeBossMonster()
  13.   init_ParticleConstants()
  14.   init_Particles()
  15.   playerHealth = 3
  16.   levelScore = 0
  17.   member("Score Display").text = string(playerScore)
  18.   playerlevel = playerlevel + 1
  19.   repeat with wBulb = 1 to 3
  20.     if wBulb <= playerHealth then
  21.       set the member of sprite (410 + wBulb) to "Health Bulb On"
  22.       next repeat
  23.     end if
  24.     sprite(410 + wBulb).visible = "Health Bulb Off"
  25.   end repeat
  26.   repeat with wBossBit = 20 to 27
  27.     sprite(wBossBit).visible = 0
  28.   end repeat
  29.   bossIntro = 0
  30.   thoughtBaloonVisible = 0
  31.   locksOpened = 0
  32.   repeat with wBGsprite = 1 to 5
  33.     set the locV of sprite (wBGsprite + 10) to 440
  34.   end repeat
  35.   case playerlevel of
  36.     1:
  37.       loadLevel(1)
  38.       playerLocData[3] = point(1000, 350)
  39.       portalIndex = []
  40.       curLoc = (point(147, 4.5) * 50) - 25
  41.       add(portalIndex, rect(curLoc[1] - 25, curLoc[2] - 25, curLoc[1] + 25, curLoc[2] + 25))
  42.       playerLocData[3] = point(350, 400)
  43.       playerLocData[7] = #R
  44.       set the member of sprite 10 to "BG sunSky"
  45.       paralaxBgData = []
  46.       repeat with wBG = 1 to 30
  47.         add(paralaxBgData, random(2))
  48.       end repeat
  49.       updateParalaxBG()
  50.       addMonster(9, (point(53, 5) * 50) - 25, [point(4, 4), 10, 0, 0], 2)
  51.       addMonster(9, (point(80, 9) * 50) - 25, [point(4, 4), 10, 0, 0], 2)
  52.       addMonster(1, (point(32, 6) * 50) - 25, [point(6, 0), point(0, 120), point(0, 0), 0])
  53.       addMonster(4, (point(24, 5) * 50) - 25, [point(4, 4), point(0, 120), point(0, 0), 0], 2)
  54.       addMonster(4, (point(38, 3) * 50) - 25, [point(4, 4), point(0, 120), point(0, 0), 0], 2)
  55.       addMonster(4, (point(114, 8) * 50) - 25, [point(4, 4), point(0, 120), point(0, 0), 0], 2)
  56.       addMonster(4, (point(121, 8) * 50) - 25, [point(4, 4), point(0, 120), point(0, 0), 0], 2)
  57.       addMonster(4, (point(51, 5) * 50) - 25, [point(4, 4), point(0, 120), point(0, 0), 0], 2)
  58.       addMonster(4, (point(63, 7) * 50) - 25, [point(4, 4), point(0, 120), point(0, 0), 0], 2)
  59.       addMonster(4, (point(67, 5) * 50) - 25, [point(4, 4), point(0, 120), point(0, 0), 0], 2)
  60.       addMonster(4, (point(71, 3) * 50) - 25, [point(4, 4), point(0, 120), point(0, 0), 0], 2)
  61.       addMonster(1, (point(106, 1) * 50) - 25, [point(-6, 0), point(0, 120), point(0, 0), 0])
  62.       addMonster(1, (point(106, 2) * 50) - 25, [point(-6, 0), point(0, 120), point(0, 0), 0])
  63.       addMonster(1, (point(106, 3) * 50) - 25, [point(-6, 0), point(0, 120), point(0, 0), 0])
  64.       addMonster(1, (point(106, 4) * 50) - 25, [point(-6, 0), point(0, 120), point(0, 0), 0])
  65.     2:
  66.       loadLevel(2)
  67.       playerLocData[3] = point(1000, 350)
  68.       portalIndex = []
  69.       curLoc = (point(146, 4.5) * 50) - 25
  70.       add(portalIndex, rect(curLoc[1] - 25, curLoc[2] - 25, curLoc[1] + 25, curLoc[2] + 25))
  71.       playerLocData[3] = (point(8, 5) * 50) - 25
  72.       playerLocData[7] = #L
  73.       set the member of sprite 10 to "BG sunSky"
  74.       paralaxBgData = []
  75.       repeat with wBG = 1 to 30
  76.         add(paralaxBgData, random(2))
  77.       end repeat
  78.       updateParalaxBG()
  79.       addMonster(6, (point(0, 2) * 50) - 25, [0, 0])
  80.     3:
  81.       loadLevel(3)
  82.       playerLocData[3] = point(1000, 350)
  83.       portalIndex = []
  84.       curLoc = (point(147, 4.5) * 50) - 25
  85.       add(portalIndex, rect(curLoc[1] - 25, curLoc[2] - 25, curLoc[1] + 25, curLoc[2] + 25))
  86.       playerLocData[3] = (point(8, 5) * 50) - 25
  87.       playerLocData[7] = #L
  88.       set the member of sprite 10 to "BG nightSky"
  89.       paralaxBgData = []
  90.       repeat with wBG = 1 to 30
  91.         add(paralaxBgData, random(4) + 2)
  92.       end repeat
  93.       updateParalaxBG()
  94.     4:
  95.       loadLevel(4)
  96.       bossIntro = 200
  97.       portalIndex = []
  98.       curLoc = (point(147, 4.5) * 50) - 25
  99.       add(portalIndex, rect(curLoc[1] - 25, curLoc[2] - 25, curLoc[1] + 25, curLoc[2] + 25))
  100.       playerLocData[3] = (point(50, 0) * 50) - 25
  101.       playerLocData[7] = #R
  102.       set the member of sprite 10 to "BG nightSky"
  103.       paralaxBgData = []
  104.       repeat with wBG = 1 to 30
  105.         add(paralaxBgData, random(4) + 2)
  106.       end repeat
  107.       updateParalaxBG()
  108.       thoughtBaloonVisible = 1
  109.   end case
  110.   sprite(27).visible = thoughtBaloonVisible
  111.   animDelay = 0
  112.   animNumber = 1
  113.   anchorViewPoint = playerLocData[3] - point(290, 250)
  114.   monsterHitArea = []
  115.   member("Coin Display").text = string(playerInventory[1])
  116.   member("Key Display").text = string(playerInventory[2])
  117.   member("Lives Display").text = string(playerInventory[3])
  118.   viewChangerooRecord = playerViewpoint / screenTileSize
  119.   repositionTerrain()
  120.   redrawTerrainPics()
  121.   lastTimerCheck = the ticks
  122.   totalFrames = 0
  123.   hitIndicatorDelay = 0
  124.   hitIndicatorLength = 0
  125.   bubbleData = [0, 100, point(0, 0)]
  126.   startloc = playerViewpoint + point(200, 150)
  127.   killOnlyOnce = 1
  128.   go(10)
  129. end
  130.