home *** CD-ROM | disk | FTP | other *** search
- on GETFLOOR
- global FLOOR, GRIDX, GRIDY, GRIDVAL, TELE, L, MAN, DR, BUTGRID, TEMBUTGRID, THEAD
- set THEAD to 0
- set BUTGRID to 0
- repeat with n = 1 to 168
- setAt(GRIDVAL, n, 0)
- end repeat
- set FLOOR to EMPTY
- repeat with n = 1 to 168
- set L to EMPTY
- set L to chars(FLOOR, n, n)
- if L = "N" 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 L = " " then
- setAt(GRIDVAL, n, 0)
- end if
- if L = "F" then
- setAt(GRIDVAL, n, 1)
- set the locH of sprite 10 to getAt(GRIDX, n)
- set the locV of sprite 10 to getAt(GRIDY, n)
- updateStage()
- end if
- if L = "R" 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 L = "B" 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 L = "M" then
- 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 L = "D" 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
- end
-