home *** CD-ROM | disk | FTP | other *** search
- global gPlayer, geEnemyList, gFinalPoints
-
- on prepareFrame me
- repeat with i = 1 to count(gFinalPoints) - 1
- repeat with j = i + 1 to count(gFinalPoints)
- if gFinalPoints[j][2] > gFinalPoints[i][2] then
- tmp = gFinalPoints[j]
- gFinalPoints[j] = gFinalPoints[i]
- gFinalPoints[i] = tmp
- end if
- end repeat
- end repeat
- theSprite = 401
- playerFinish = 0
- playerPoints = 0
- repeat with n = 1 to count(gFinalPoints)
- if gFinalPoints[n][1] = gPlayer.pMySpriteNum then
- playerFinish = n
- playerPoints = gFinalPoints[n][2]
- next repeat
- end if
- theEnemyNum = e_findEnemyFromSpriteNum(gFinalPoints[n][1])
- end repeat
- if playerFinish > 1 then
- playerPlaceMod = 0
- repeat with i = playerFinish - 1 down to 1
- if gFinalPoints[i][2] = playerPoints then
- playerPlaceMod = playerPlaceMod - 1
- end if
- end repeat
- playerFinish = playerFinish + playerPlaceMod
- end if
- member("Final Score Total").text = "Your Score: " & string(playerPoints)
- member("Final Ranking Total").text = "You Ranked #" & string(playerFinish)
- if playerFinish = 1 then
- member("Win/Lose").text = "You Win!"
- puppetSound(2, "win")
- else
- member("Win/Lose").text = "Give It Another Try"
- puppetSound(2, "lose")
- end if
- end
-