home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 July / WPCJUL96.ISO / file.exe / GROFINJ.DXR / 00028_groanimatescreen,GRONoise.ls < prev    next >
Encoding:
Text File  |  1996-05-15  |  3.7 KB  |  101 lines

  1. on groANIMATESCREEN
  2.   global grosectactive, groanimatelist, grosection, gropointer, groanimloop, grosprite, grotmpanimsprite, GRONoisePiCount, GROChooseQuit
  3.   repeat with gropointer = 1 to count(groanimatelist)
  4.     set grosprite to getAt(getAt(groanimatelist, gropointer), 1)
  5.     if rollOver(grosprite) then
  6.       setAt(getAt(groanimatelist, gropointer), 5, 1)
  7.       if getAt(getAt(groanimatelist, gropointer), 4) = 1 then
  8.         set the castNum of sprite grosprite to getAt(getAt(groanimatelist, gropointer), 2)
  9.         set the castNum of sprite 34 to getAt(getAt(groanimatelist, gropointer), 6)
  10.         set the locH of sprite 34 to 200
  11.         set the locV of sprite 34 to 200
  12.         set the ink of sprite 34 to 39
  13.         updateStage()
  14.       end if
  15.       repeat while rollOver(grosprite)
  16.         if rollOver(48) then
  17.           exit repeat
  18.         end if
  19.         if the mouseDown then
  20.           if getAt(getAt(groanimatelist, gropointer), 4) = 1 then
  21.             sound fadeOut 1, 120
  22.             startTimer()
  23.             repeat while the timer < 120
  24.             end repeat
  25.             puppetSound(0)
  26.             updateStage()
  27.             setAt(getAt(groanimatelist, gropointer), 5, 0)
  28.             do(getAt(grosection, gropointer))
  29.             if GROChooseQuit = 2 then
  30.               exit repeat
  31.             end if
  32.           end if
  33.         end if
  34.         if GROChooseQuit = 2 then
  35.           exit repeat
  36.         end if
  37.         if gropointer > count(groanimatelist) then
  38.           set gropointer to count(groanimatelist)
  39.         end if
  40.         if getAt(getAt(groanimatelist, gropointer), 4) = 1 then
  41.           if GRONoisePiCount = 16 then
  42.             set GRONoisePiCount to 0
  43.             if the castNum of sprite grosprite <> getAt(getAt(groanimatelist, gropointer), 3) then
  44.               set the castNum of sprite grosprite to the castNum of sprite grosprite + 1
  45.             else
  46.               set the castNum of sprite grosprite to getAt(getAt(groanimatelist, gropointer), 2)
  47.             end if
  48.             updateStage()
  49.           else
  50.             set GRONoisePiCount to 1 + GRONoisePiCount
  51.           end if
  52.         end if
  53.         GRONoise()
  54.       end repeat
  55.       if GROChooseQuit = 2 then
  56.         exit repeat
  57.       end if
  58.       if getAt(getAt(groanimatelist, gropointer), 5) = 1 then
  59.         setAt(getAt(groanimatelist, gropointer), 5, 0)
  60.         set the locH of sprite 34 to 2000
  61.         repeat with x = 1 to count(groanimatelist)
  62.           if getAt(getAt(groanimatelist, x), 4) = 0 then
  63.             set the castNum of sprite 34 to getAt(getAt(groanimatelist, x), 6)
  64.             set the locH of sprite 34 to 200
  65.             set the locV of sprite 34 to 200
  66.           end if
  67.         end repeat
  68.         updateStage()
  69.       end if
  70.       repeat with i = 1 to count(groanimatelist)
  71.         if getAt(getAt(groanimatelist, i), 4) = 1 then
  72.           set the castNum of sprite getAt(getAt(groanimatelist, i), 1) to 19
  73.           updateStage()
  74.         end if
  75.       end repeat
  76.     end if
  77.   end repeat
  78.   if GROChooseQuit <> 2 then
  79.     GRONoise()
  80.     GROQuitCD()
  81.   end if
  82. end
  83.  
  84. on GRONoise
  85.   global groanimatelist, grotmpanimsprite
  86.   IFLsectionWordAnimate()
  87.   repeat with i = 1 to count(groanimatelist)
  88.     if the castNum of sprite getAt(getAt(groanimatelist, i), 1) <> 22 then
  89.       if (getAt(getAt(groanimatelist, i), 4) = 1) and (getAt(getAt(groanimatelist, i), 5) = 0) then
  90.         set the castNum of sprite getAt(getAt(groanimatelist, i), 1) to the castNum of sprite getAt(getAt(groanimatelist, i), 1) + 1
  91.       end if
  92.       next repeat
  93.     end if
  94.     if (getAt(getAt(groanimatelist, i), 4) = 1) and (getAt(getAt(groanimatelist, i), 5) = 0) then
  95.       set the castNum of sprite getAt(getAt(groanimatelist, i), 1) to 19
  96.     end if
  97.   end repeat
  98.   updateStage()
  99.   wait(0.03)
  100. end
  101.