home *** CD-ROM | disk | FTP | other *** search
/ Más de 2,500 Juegos / CD1.iso / ZIPDAT / 0324 / 0324.ZIP / Setup.exe / SQUARK.EXE / SQUARK.dxr / 00017_MOVEBALL.ls < prev    next >
Encoding:
Text File  |  1999-08-01  |  3.4 KB  |  132 lines

  1. on moveball
  2.   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
  3.   if DEAD = 1 then
  4.     exit
  5.   end if
  6.   if (GHOST = 1) and (DELAYIT > 10) then
  7.     set GHOST to 0
  8.     set GHOSTCNT to 0
  9.     repeat with n = 9 to 12
  10.       set the castNum of sprite n to cast "GREENBALL"
  11.       updateStage()
  12.     end repeat
  13.     if EBALL1 = 100 then
  14.       set EBALL1 to 42
  15.       set EBALL1H to getAt(GRIDX, 42)
  16.       set EBALL1V to getAt(GRIDY, 42)
  17.     end if
  18.     if EBALL2 = 100 then
  19.       set EBALL2 to 42
  20.       set EBALL2H to getAt(GRIDX, 42)
  21.       set EBALL2V to getAt(GRIDY, 42)
  22.     end if
  23.     if EBALL3 = 100 then
  24.       set EBALL3 to 42
  25.       set EBALL3H to getAt(GRIDX, 42)
  26.       set EBALL3V to getAt(GRIDY, 42)
  27.     end if
  28.     if EBALL4 = 100 then
  29.       set EBALL4 to 42
  30.       set EBALL4H to getAt(GRIDX, 42)
  31.       set EBALL4V to getAt(GRIDY, 42)
  32.     end if
  33.   end if
  34.   if BALLCNT >= 80 then
  35.     CHECKCORNER()
  36.     if GRIDNUM = DOT1 then
  37.       set DOT1 to 0
  38.       puppetSound("DOTGOT.WAV")
  39.       set the locH of sprite ES1 to -2000
  40.       set the locV of sprite ES1 to -2000
  41.       updateStage()
  42.       set the castNum of sprite ES1 to 30
  43.       set DELAYIT to 0
  44.       set GHOST to 1
  45.       set GHOSTCNT to 0
  46.       repeat with n = 9 to 12
  47.         set the castNum of sprite n to cast "WHITEBALL"
  48.         updateStage()
  49.       end repeat
  50.     end if
  51.     if GRIDNUM = DOT2 then
  52.       puppetSound("DOTGOT.WAV")
  53.       set DOT2 to 0
  54.       set the locH of sprite ES2 to -2000
  55.       set the locV of sprite ES2 to -2000
  56.       updateStage()
  57.       set the castNum of sprite ES2 to 30
  58.       set GHOST to 1
  59.       set GHOSTCNT to 0
  60.       repeat with n = 9 to 12
  61.         set the castNum of sprite n to cast "WHITEBALL"
  62.         updateStage()
  63.       end repeat
  64.       set DELAYIT to 0
  65.     end if
  66.   end if
  67.   if BALLCNT = 0 then
  68.     set TTEMDR to 0
  69.     if getAt(VALDR, (DESGRIDNUM * 4) - 4 + TEMDR) = 0 then
  70.       if DR <> 0 then
  71.         if getAt(VALDR, (DESGRIDNUM * 4) - 4 + DR) = 1 then
  72.           set TTEMDR to TEMDR
  73.         end if
  74.         set TEMDR to DR
  75.       end if
  76.       if getAt(VALDR, (DESGRIDNUM * 4) - 4 + TEMDR) = 0 then
  77.         set DR to 0
  78.       end if
  79.     end if
  80.     if getAt(VALDR, (DESGRIDNUM * 4) - 4 + TEMDR) = 1 then
  81.       if TEMDR = 1 then
  82.         set DESGRIDNUM to GRIDNUM - 7
  83.       end if
  84.       if TEMDR = 2 then
  85.         set DESGRIDNUM to GRIDNUM + 1
  86.       end if
  87.       if TEMDR = 3 then
  88.         set DESGRIDNUM to GRIDNUM + 7
  89.       end if
  90.       if TEMDR = 4 then
  91.         set DESGRIDNUM to GRIDNUM - 1
  92.       end if
  93.       if DR <> TEMDR then
  94.         puppetSound("BALL.WAV")
  95.       end if
  96.       set DR to TEMDR
  97.       if TTEMDR <> 0 then
  98.         set TEMDR to TTEMDR
  99.       end if
  100.     end if
  101.   end if
  102.   if DR <> 0 then
  103.     set BALLCNT to BALLCNT + SPEED
  104.     if DR = 1 then
  105.       set Y to Y - SPEED
  106.     end if
  107.     if DR = 2 then
  108.       set X to X + SPEED
  109.     end if
  110.     if DR = 3 then
  111.       set Y to Y + SPEED
  112.     end if
  113.     if DR = 4 then
  114.       set X to X - SPEED
  115.     end if
  116.     set the locH of sprite 8 to X
  117.     set the locV of sprite 8 to Y
  118.   end if
  119.   if LEVEL <= 3 then
  120.     set SKPCNT to SKPCNT + 1
  121.     if SKPCNT = 2 then
  122.       OTHERMOVE()
  123.     end if
  124.     if SKPCNT >= 2 then
  125.       set SKPCNT to 0
  126.     end if
  127.   end if
  128.   if LEVEL > 3 then
  129.     OTHERMOVE()
  130.   end if
  131. end
  132.