home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 August / WPCAUG96.ISO / mgiwaug.dxr / 00014_MGIExplore.ls < prev    next >
Encoding:
Text File  |  1996-06-14  |  1.6 KB  |  56 lines

  1. on MGIExplore
  2.   global MGIFindTV, MGIDirH, MGIDirV, MGIGETCount
  3.   repeat while MGIFindTV = 0
  4.     wait(0.05)
  5.     MGISpinE()
  6.     set the locH of sprite 2 to the locH of sprite 2 + (MGIDirH * 20)
  7.     set the locV of sprite 2 to the locV of sprite 2 + (MGIDirV * 30)
  8.     updateStage()
  9.     if the locH of sprite 2 > 640 then
  10.       set MGIDirH to -1
  11.     end if
  12.     if the locH of sprite 2 < 0 then
  13.       set MGIDirH to 1
  14.     end if
  15.     if the locV of sprite 2 > 480 then
  16.       set MGIDirV to -1
  17.     end if
  18.     if the locV of sprite 2 < 0 then
  19.       set MGIDirV to 1
  20.     end if
  21.     if (the locH of sprite 2 > 411) and (the locV of sprite 2 < 120) then
  22.       set MGIDirV to 1
  23.     end if
  24.     if (the locH of sprite 2 > 390) and (the locV of sprite 2 < 120) then
  25.       set MGIDirH to -1
  26.     end if
  27.     repeat while (the right of sprite 2 > the mouseH) and (the left of sprite 2 < the mouseH) and (the top of sprite 2 < the mouseV) and (the bottom of sprite 2 > the mouseV)
  28.       MGISpinE()
  29.       if rollOver(2) then
  30.         set MGIFindTV to 1
  31.         exit repeat
  32.       end if
  33.     end repeat
  34.   end repeat
  35.   if MGIFindTV = 1 then
  36.     repeat while MGIFindTV = 1
  37.       if MGIGETCount = 3 then
  38.         set the locH of sprite 29 to 200
  39.         set the locV of sprite 29 to 271
  40.         updateStage()
  41.       else
  42.         if MGIGETCount = 6 then
  43.           set MGIGETCount to 0
  44.           set the locH of sprite 29 to 2000
  45.           updateStage()
  46.         end if
  47.       end if
  48.       set MGIGETCount to 1 + MGIGETCount
  49.       MGINoiseMove()
  50.       MGISpinE()
  51.       set the locH of sprite 2 to the mouseH
  52.       set the locV of sprite 2 to the mouseV
  53.     end repeat
  54.   end if
  55. end
  56.