home *** CD-ROM | disk | FTP | other *** search
- on moveball
- global GRIDX, GRIDY, VALDR, DR, BALLCNT, X, Y, GRIDNUM, DESGRIDNUM, SPEED, D1, D2, D3, D4, EBALL1, EBALL2, EBALL3, DOT1, DOT2, TDR, row, BLOCK, TEMBLOCK, TEMDR, GHOST, DELAYIT, EBALL4, EBALL1H, EBALL2H, EBALL3H, EBALL4H, EBALL1V, EBALL2V, EBALL3V, EBALL4V, TTIM, ES1, ES2, GHOSTCNT, LEVEL, SKPCNT, BALLSLEFT, DEAD, TTEMDR
- if DEAD = 1 then
- exit
- end if
- if (GHOST = 1) and (DELAYIT > 10) then
- set GHOST to 0
- set GHOSTCNT to 0
- repeat with n = 9 to 12
- set the castNum of sprite n to cast "GREENBALL"
- updateStage()
- end repeat
- if EBALL1 = 100 then
- set EBALL1 to 42
- set EBALL1H to getAt(GRIDX, 42)
- set EBALL1V to getAt(GRIDY, 42)
- end if
- if EBALL2 = 100 then
- set EBALL2 to 42
- set EBALL2H to getAt(GRIDX, 42)
- set EBALL2V to getAt(GRIDY, 42)
- end if
- if EBALL3 = 100 then
- set EBALL3 to 42
- set EBALL3H to getAt(GRIDX, 42)
- set EBALL3V to getAt(GRIDY, 42)
- end if
- if EBALL4 = 100 then
- set EBALL4 to 42
- set EBALL4H to getAt(GRIDX, 42)
- set EBALL4V to getAt(GRIDY, 42)
- end if
- end if
- if BALLCNT >= 80 then
- CHECKCORNER()
- if GRIDNUM = DOT1 then
- set DOT1 to 0
- puppetSound("DOTGOT.WAV")
- set the locH of sprite ES1 to -2000
- set the locV of sprite ES1 to -2000
- updateStage()
- set the castNum of sprite ES1 to 30
- set DELAYIT to 0
- set GHOST to 1
- set GHOSTCNT to 0
- repeat with n = 9 to 12
- set the castNum of sprite n to cast "WHITEBALL"
- updateStage()
- end repeat
- end if
- if GRIDNUM = DOT2 then
- puppetSound("DOTGOT.WAV")
- set DOT2 to 0
- set the locH of sprite ES2 to -2000
- set the locV of sprite ES2 to -2000
- updateStage()
- set the castNum of sprite ES2 to 30
- set GHOST to 1
- set GHOSTCNT to 0
- repeat with n = 9 to 12
- set the castNum of sprite n to cast "WHITEBALL"
- updateStage()
- end repeat
- set DELAYIT to 0
- end if
- end if
- if BALLCNT = 0 then
- set TTEMDR to 0
- if getAt(VALDR, (DESGRIDNUM * 4) - 4 + TEMDR) = 0 then
- if DR <> 0 then
- if getAt(VALDR, (DESGRIDNUM * 4) - 4 + DR) = 1 then
- set TTEMDR to TEMDR
- end if
- set TEMDR to DR
- end if
- if getAt(VALDR, (DESGRIDNUM * 4) - 4 + TEMDR) = 0 then
- set DR to 0
- end if
- end if
- if getAt(VALDR, (DESGRIDNUM * 4) - 4 + TEMDR) = 1 then
- if TEMDR = 1 then
- set DESGRIDNUM to GRIDNUM - 7
- end if
- if TEMDR = 2 then
- set DESGRIDNUM to GRIDNUM + 1
- end if
- if TEMDR = 3 then
- set DESGRIDNUM to GRIDNUM + 7
- end if
- if TEMDR = 4 then
- set DESGRIDNUM to GRIDNUM - 1
- end if
- if DR <> TEMDR then
- puppetSound("BALL.WAV")
- end if
- set DR to TEMDR
- if TTEMDR <> 0 then
- set TEMDR to TTEMDR
- end if
- end if
- end if
- if DR <> 0 then
- set BALLCNT to BALLCNT + SPEED
- if DR = 1 then
- set Y to Y - SPEED
- end if
- if DR = 2 then
- set X to X + SPEED
- end if
- if DR = 3 then
- set Y to Y + SPEED
- end if
- if DR = 4 then
- set X to X - SPEED
- end if
- set the locH of sprite 8 to X
- set the locV of sprite 8 to Y
- end if
- if LEVEL <= 3 then
- set SKPCNT to SKPCNT + 1
- if SKPCNT = 2 then
- OTHERMOVE()
- end if
- if SKPCNT >= 2 then
- set SKPCNT to 0
- end if
- end if
- if LEVEL > 3 then
- OTHERMOVE()
- end if
- end
-