home *** CD-ROM | disk | FTP | other *** search
- on exitFrame me
- global playerViewPoint, playerData, blasterData, totalDistance, gatewayData, playerlevel, dheight, enemyData, warningLevels, warningSwitch, warningDelay
- harvestInput()
- if playerData[2][2] <= 1000 then
- if totalDistance < [200, 300, 400][playerlevel] then
- repeat with wSection = 1 to 10
- appendmap()
- end repeat
- else
- repeat with wSection = 1 to 10
- appendmap(#Finish)
- end repeat
- if gatewayData[1] = 0 then
- gatewayData = [1, 0]
- set the member of sprite 201 to "FinishLine"
- sprite(201).locZ = 400
- end if
- end if
- end if
- playerViewPoint = point(0, playerData[2][2] - 275)
- moveterrain()
- if playerData[1] = 1 then
- moveplayer()
- else
- rAim = random(360)
- sRad = random(25)
- locY = cos(rAim * PI / 180) * sRad
- locX = sin(rAim * PI / 180) * -sRad
- addparticle(playerData[2] + point(locX, locY), 0, random(3))
- if random(4) = 1 then
- playSound("enemy explosion", 2)
- end if
- if playerData[9] > 0 then
- playerData[9] = playerData[9] - 1
- end if
- end if
- moveEnemy()
- moveParticles()
- dheight = gatewayData[2] - playerViewPoint[2]
- if (gatewayData[1] = 1) and (dheight > -100) and (dheight <= 600) then
- set the locV of sprite 201 to dheight
- end if
- watchme = gatewayData[2] - playerViewPoint[2]
- repeat with wRep = 1 to 2
- if blasterData[1] = 1 then
- blasterData[4] = blasterData[4] - 1
- if blasterData[4] <= 0 then
- blasterData[1] = 0
- else
- blasterData[2] = blasterData[2] + (blasterData[3] / 2)
- aimTHIS = findAngle(point(0, 0), blasterData[3])
- if wRep = 1 then
- addparticle(blasterData[2], aimTHIS, 4)
- end if
- end if
- end if
- if blasterData[1] = 1 then
- repeat with wEnemy = 1 to count(enemyData)
- if enemyData[wEnemy][1] = 1 then
- if [0, 0, 1, 1, 1, 1, 1][enemyData[wEnemy][2]] = 1 then
- if findDistance(enemyData[wEnemy][3], blasterData[2]) <= 25 then
- enemyData[wEnemy][6] = enemyData[wEnemy][6] + 150
- blasterData[1] = 0
- rMove = random(72)
- repeat with wTurn = 1 to 3
- locY = cos((rMove + (wTurn * 120)) * PI / 180) * 20
- locX = sin((rMove + (wTurn * 120)) * PI / 180) * -20
- addparticle(blasterData[2] + point(locX, locY), 0, 1)
- end repeat
- addparticle(blasterData[2], 0, 1)
- end if
- end if
- end if
- end repeat
- end if
- end repeat
- if playerData[1] = 1 then
- if playerData[8] > 0 then
- playerData[8] = playerData[8] - 1
- else
- playerData[1] = 0
- end if
- end if
- set the height of sprite 510 to integer(playerData[5] / 1000.0 * 40)
- set the width of sprite 508 to integer(playerData[8] / 3000.0 * 152)
- repeat with wWarn = 1 to count(warningLevels)
- if warningSwitch[wWarn] = 0 then
- if (warningLevels[wWarn] * 30) > playerData[8] then
- member("Fuel Warning").text = "Fuel Tank: " & string(warningLevels[wWarn]) & "%"
- warningSwitch[wWarn] = 1
- warningDelay = 60
- end if
- end if
- end repeat
- if warningDelay > 0 then
- if (warningDelay mod 12) > 1 then
- sprite(2).visible = 1
- else
- sprite(2).visible = 0
- end if
- warningDelay = warningDelay - 1
- end if
- runBulletStreaks()
- if (playerData[2][2] < (gatewayData[2] - 50)) and (playerData[9] = 40) then
- if playerlevel >= 3 then
- sprite(2).visible = 0
- go(20)
- else
- sprite(2).visible = 0
- go(15)
- end if
- else
- if playerData[9] <= 0 then
- sprite(2).visible = 0
- go(25)
- else
- go(the frame)
- end if
- end if
- end
-