home *** CD-ROM | disk | FTP | other *** search
- on RESTOREBOARD
- global FLOOR, GRIDX, GRIDY, GRIDVAL, TELE, L, MAN, startMovie, BUTGRID, TEMBUTGRID, PUZZ, SOLUTIONFLAG, SOLCNT, SOL, TEMPBOARD, HEAD, THEAD, DR
- set GRIDVAL to []
- repeat with n = 10 to 12
- set the locH of sprite n to -2000
- set the locV of sprite n to -2000
- updateStage()
- end repeat
- set the trails of sprite 10 to 1
- set the trails of sprite 11 to 1
- set the trails of sprite 12 to 1
- set the locH of sprite 8 to -2000
- set the locV of sprite 8 to -2000
- updateStage()
- repeat with n = 1 to 168
- if getAt(TEMPBOARD, n) > 1 then
- set the locH of sprite 40 to getAt(GRIDX, n)
- set the locV of sprite 40 to getAt(GRIDY, n)
- updateStage()
- set the locH of sprite 40 to -2000
- set the locV of sprite 40 to -2000
- updateStage()
- end if
- if getAt(TEMPBOARD, n) = 15 then
- setAt(GRIDVAL, n, 15)
- set BUTGRID to n
- set TEMBUTGRID to n
- set the locH of sprite 8 to getAt(GRIDX, n)
- set the locV of sprite 8 to getAt(GRIDY, n)
- updateStage()
- end if
- if getAt(TEMPBOARD, n) = 0 then
- setAt(GRIDVAL, n, 0)
- end if
- if getAt(TEMPBOARD, n) = 1 then
- setAt(GRIDVAL, n, 1)
- end if
- if getAt(TEMPBOARD, n) = 5 then
- setAt(GRIDVAL, n, 5)
- set the locH of sprite 12 to getAt(GRIDX, n)
- set the locV of sprite 12 to getAt(GRIDY, n)
- updateStage()
- end if
- if getAt(TEMPBOARD, n) = 2 then
- setAt(GRIDVAL, n, 2)
- set the locH of sprite 11 to getAt(GRIDX, n)
- set the locV of sprite 11 to getAt(GRIDY, n)
- updateStage()
- end if
- if getAt(TEMPBOARD, n) = 100 then
- setAt(GRIDVAL, n, 0)
- set MAN to n
- set the locH of sprite 30 to getAt(GRIDX, n)
- set the locV of sprite 30 to getAt(GRIDY, n)
- updateStage()
- end if
- if getAt(TEMPBOARD, n) = 30 then
- setAt(GRIDVAL, n, 30)
- set TELE to n
- set the locH of sprite 9 to getAt(GRIDX, n)
- set the locV of sprite 9 to getAt(GRIDY, n)
- updateStage()
- end if
- end repeat
- repeat with n = 10 to 12
- set the locH of sprite n to -2000
- set the locV of sprite n to -2000
- updateStage()
- end repeat
- set TEMPBOARD to []
- repeat with n = 1 to 168
- setAt(TEMPBOARD, n, getAt(GRIDVAL, n))
- end repeat
- setAt(TEMPBOARD, MAN, 100)
- set the locH of sprite 30 to getAt(GRIDX, MAN)
- set the locV of sprite 30 to getAt(GRIDY, MAN)
- updateStage()
- if HEAD = 1 then
- set the locH of sprite 11 to getAt(GRIDX, MAN - 14)
- set the locV of sprite 11 to getAt(GRIDY, MAN - 14)
- updateStage()
- end if
- set the trails of sprite 10 to 0
- set the trails of sprite 11 to 0
- set the trails of sprite 12 to 0
- updateStage()
- end
-