home *** CD-ROM | disk | FTP | other *** search
- on showviews
- global map, posx, posy
- repeat with i = 4 down to 0
- if (posy - i) > 0 then
- if getAt(getAt(map, posy - i), posx - 1) = 1 then
- set the castNum of sprite (10 - i) to 5 - i
- else
- if getAt(getAt(map, posy - i), posx - 1) = 2 then
- set the castNum of sprite (10 - i) to 5 - i + 10
- else
- set the castNum of sprite (10 - i) to 209
- end if
- end if
- if getAt(getAt(map, posy - i), posx + 1) = 1 then
- set the castNum of sprite (15 - i) to 10 - i
- next repeat
- end if
- if getAt(getAt(map, posy - i), posx + 1) = 2 then
- set the castNum of sprite (15 - i) to 10 - i + 10
- next repeat
- end if
- set the castNum of sprite (15 - i) to 209
- end if
- end repeat
- repeat with i = 4 down to 1
- if (posy - i) > 0 then
- if getAt(getAt(map, posy - i), posx) = 1 then
- set the castNum of sprite (20 - i) to 15 - i
- next repeat
- end if
- if getAt(getAt(map, posy - i), posx) = 2 then
- set the castNum of sprite (20 - i) to 15 - i + 5
- next repeat
- end if
- set the castNum of sprite (20 - i) to 209
- end if
- end repeat
- end
-
- on preview
- global getmap, posx, posy
- if the castNum of sprite 20 = the number of cast "N" then
- set posxkeep2 to posx
- set posykeep2 to posy
- else
- if the castNum of sprite 20 = the number of cast "E" then
- set posxkeep2 to 33 - posy
- set posykeep2 to posx
- else
- if the castNum of sprite 20 = the number of cast "S" then
- set posxkeep2 to 33 - posx
- set posykeep2 to 23 - posy
- else
- if the castNum of sprite 20 = the number of cast "W" then
- set posxkeep2 to posy
- set posykeep2 to 23 - posx
- end if
- end if
- end if
- end if
- set the locH of sprite 31 to the left of sprite 30 + 2 + (5 * (posxkeep2 - 1))
- set the locV of sprite 31 to the top of sprite 30 + 2 + (5 * (posykeep2 - 1))
- end
-