home *** CD-ROM | disk | FTP | other *** search
/ Seeker / Seeker.iso / files_w / 3d_dun.dir / 00073.ls < prev    next >
Encoding:
Text File  |  1994-12-01  |  1.9 KB  |  64 lines

  1. on showviews
  2.   global map, posx, posy
  3.   repeat with i = 4 down to 0
  4.     if (posy - i) > 0 then
  5.       if getAt(getAt(map, posy - i), posx - 1) = 1 then
  6.         set the castNum of sprite (10 - i) to 5 - i
  7.       else
  8.         if getAt(getAt(map, posy - i), posx - 1) = 2 then
  9.           set the castNum of sprite (10 - i) to 5 - i + 10
  10.         else
  11.           set the castNum of sprite (10 - i) to 209
  12.         end if
  13.       end if
  14.       if getAt(getAt(map, posy - i), posx + 1) = 1 then
  15.         set the castNum of sprite (15 - i) to 10 - i
  16.         next repeat
  17.       end if
  18.       if getAt(getAt(map, posy - i), posx + 1) = 2 then
  19.         set the castNum of sprite (15 - i) to 10 - i + 10
  20.         next repeat
  21.       end if
  22.       set the castNum of sprite (15 - i) to 209
  23.     end if
  24.   end repeat
  25.   repeat with i = 4 down to 1
  26.     if (posy - i) > 0 then
  27.       if getAt(getAt(map, posy - i), posx) = 1 then
  28.         set the castNum of sprite (20 - i) to 15 - i
  29.         next repeat
  30.       end if
  31.       if getAt(getAt(map, posy - i), posx) = 2 then
  32.         set the castNum of sprite (20 - i) to 15 - i + 5
  33.         next repeat
  34.       end if
  35.       set the castNum of sprite (20 - i) to 209
  36.     end if
  37.   end repeat
  38. end
  39.  
  40. on preview
  41.   global getmap, posx, posy
  42.   if the castNum of sprite 20 = the number of cast "N" then
  43.     set posxkeep2 to posx
  44.     set posykeep2 to posy
  45.   else
  46.     if the castNum of sprite 20 = the number of cast "E" then
  47.       set posxkeep2 to 33 - posy
  48.       set posykeep2 to posx
  49.     else
  50.       if the castNum of sprite 20 = the number of cast "S" then
  51.         set posxkeep2 to 33 - posx
  52.         set posykeep2 to 23 - posy
  53.       else
  54.         if the castNum of sprite 20 = the number of cast "W" then
  55.           set posxkeep2 to posy
  56.           set posykeep2 to 23 - posx
  57.         end if
  58.       end if
  59.     end if
  60.   end if
  61.   set the locH of sprite 31 to the left of sprite 30 + 2 + (5 * (posxkeep2 - 1))
  62.   set the locV of sprite 31 to the top of sprite 30 + 2 + (5 * (posykeep2 - 1))
  63. end
  64.