home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / AntiGravityBall.dxr / 00003.ls < prev    next >
Encoding:
Text File  |  2002-01-31  |  1.1 KB  |  41 lines

  1. on exitFrame me
  2.   global playerViewpoint, screenTileSize, playerloc, bgOffset, inputString
  3.   terrainBitDat = checkSolidpoint(playerloc)
  4.   case terrainBitDat of
  5.     1:
  6.       scrollSpeed = 5
  7.     3:
  8.       scrollSpeed = 7
  9.     4:
  10.       scrollSpeed = 3
  11.   end case
  12.   playerViewpoint[2] = playerViewpoint[2] - scrollSpeed
  13.   if playerViewpoint[2] < 0 then
  14.     playerViewpoint[2] = 0
  15.   end if
  16.   harvestinput()
  17.   playerloc = playerloc + point(0, -scrollSpeed)
  18.   if inputString[1] = 1 then
  19.     playerloc[1] = playerloc[1] - 3
  20.   else
  21.     if inputString[2] = 1 then
  22.       playerloc[1] = playerloc[1] + 3
  23.     end if
  24.   end if
  25.   if inputString[3] = 1 then
  26.     playerloc[2] = playerloc[2] + 3
  27.   else
  28.     if inputString[4] = 1 then
  29.       playerloc[2] = playerloc[2] - 3
  30.     end if
  31.   end if
  32.   set the loc of sprite 10 to playerloc - playerViewpoint + bgOffset
  33.   marbleNumber = (integer(playerloc[2] / 3) mod 10) + 1
  34.   set the member of sprite 10 to "CheckBall " & string(marbleNumber)
  35.   tilePointSet1 = playerViewpoint / screenTileSize
  36.   tilePointSet2 = (playerViewpoint + scrollSpeed) / screenTileSize
  37.   redrawTerrainPics()
  38.   repositionTerrain()
  39.   go(the frame)
  40. end
  41.