home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / Democd3 / oasquiz.dxr / 00085.ls < prev    next >
Encoding:
Text File  |  1997-06-04  |  6.8 KB  |  253 lines

  1. on mouseDown
  2.   global ans2, true_answer, Rand_Quest, guess, counter, n, oldlevel, x, leveldiff, scored, Rand_Sound, level, highest, qright, qwrong, plost, pwon, pend, notend, inarow, gameover
  3.   set the visible of sprite 20 to 0
  4.   puppetSound("click")
  5.   set the visible of sprite 13 to 0
  6.   set the visible of sprite 28 to 0
  7.   set the visible of sprite 29 to 0
  8.   set the visible of sprite 30 to 0
  9.   set the blend of sprite 6 to 90
  10.   set the locH of sprite 6 to the locH of sprite 6 + 3
  11.   set the locV of sprite 6 to the locV of sprite 6 + 3
  12.   set the locH of sprite 23 to the locH of sprite 23 + 3
  13.   set the locV of sprite 23 to the locV of sprite 23 + 3
  14.   updateStage()
  15.   set the locH of sprite 6 to the locH of sprite 6 - 3
  16.   set the locV of sprite 6 to the locV of sprite 6 - 3
  17.   set the locH of sprite 23 to the locH of sprite 23 - 3
  18.   set the locV of sprite 23 to the locV of sprite 23 - 3
  19.   set the blend of sprite 6 to 60
  20.   updateStage()
  21.   set the visible of sprite 12 to 0
  22.   set the blend of sprite 47 to 60
  23.   set the blend of sprite 37 to 45
  24.   set the blend of sprite 39 to 45
  25.   set the soundEnabled to 1
  26.   set Rand_Sound to random(5)
  27.   set the visible of sprite 8 to 1
  28.   set the locV of sprite 8 to 340
  29.   repeat with n = 1 to 100
  30.     set the locH of sprite 8 to n
  31.     updateStage()
  32.   end repeat
  33.   set Rand_Sound to random(5)
  34.   if true_answer = "2" then
  35.     set inarow to inarow + 1
  36.     set the castNum of sprite 8 to 173
  37.     updateStage()
  38.     repeat with n = 1 to 25
  39.       set vert to the locV of sprite 8
  40.       set the locV of sprite 8 to vert - n
  41.       startTimer()
  42.       repeat while the timer < 1
  43.       end repeat
  44.       updateStage()
  45.     end repeat
  46.     set the castNum of sprite 8 to 193
  47.     updateStage()
  48.     startTimer()
  49.     repeat while the timer < 8
  50.       nothing()
  51.     end repeat
  52.     set the castNum of sprite 8 to 194
  53.     updateStage()
  54.     startTimer()
  55.     repeat while the timer < 8
  56.       nothing()
  57.     end repeat
  58.     set the castNum of sprite 8 to 173
  59.     updateStage()
  60.     repeat with n = 1 to 25
  61.       set vert to the locV of sprite 8
  62.       set the locV of sprite 8 to vert + n
  63.       startTimer()
  64.       repeat while the timer < 1
  65.       end repeat
  66.       updateStage()
  67.     end repeat
  68.     set the castNum of sprite 8 to 196
  69.     set the height of sprite 8 to 26
  70.     set the width of sprite 8 to 26
  71.     updateStage()
  72.     repeat with n = 1 to 8
  73.       set the height of sprite 8 to the height of sprite 8 + n
  74.       set the width of sprite 8 to the width of sprite 8 + n
  75.       updateStage()
  76.     end repeat
  77.     startTimer()
  78.     repeat while the timer < 50
  79.       nothing()
  80.     end repeat
  81.     set the visible of sprite 8 to 0
  82.     set oldlevel to level
  83.     set level to level + 1
  84.     set leveldiff to oldlevel - level
  85.     set the soundEnabled to 1
  86.     set qright to qright + 1
  87.     if Rand_Sound = 1 then
  88.       puppetSound("yesm")
  89.     end if
  90.     if Rand_Sound = 2 then
  91.       puppetSound("vfexllnt.wav")
  92.     end if
  93.     if Rand_Sound = 3 then
  94.       puppetSound("vfyes.wav")
  95.     end if
  96.     if Rand_Sound = 4 then
  97.       puppetSound("vmcorrct.wav")
  98.     end if
  99.     if Rand_Sound = 5 then
  100.       puppetSound("clapwoop.wav")
  101.     end if
  102.     set scored to scored + 1
  103.     set the visible of sprite 20 to 1
  104.   end if
  105.   if true_answer <> "2" then
  106.     set inarow to 0
  107.     set qwrong to qwrong + 1
  108.     set the castNum of sprite 8 to 174
  109.     updateStage()
  110.     repeat with n = 1 to 14
  111.       set vert to the locV of sprite 8
  112.       set the locV of sprite 8 to vert + n
  113.       startTimer()
  114.       repeat while the timer < 1
  115.       end repeat
  116.       updateStage()
  117.     end repeat
  118.     set the castNum of sprite 8 to 191
  119.     updateStage()
  120.     startTimer()
  121.     repeat while the timer < 8
  122.       nothing()
  123.     end repeat
  124.     set the castNum of sprite 8 to 192
  125.     updateStage()
  126.     startTimer()
  127.     repeat while the timer < 8
  128.       nothing()
  129.     end repeat
  130.     set the castNum of sprite 8 to 174
  131.     updateStage()
  132.     repeat with n = 1 to 14
  133.       set vert to the locV of sprite 8
  134.       set the locV of sprite 8 to vert - n
  135.       startTimer()
  136.       repeat while the timer < 1
  137.       end repeat
  138.       updateStage()
  139.     end repeat
  140.     set the castNum of sprite 8 to 195
  141.     set the height of sprite 8 to 26
  142.     set the width of sprite 8 to 26
  143.     updateStage()
  144.     repeat with n = 1 to 8
  145.       set the height of sprite 8 to the height of sprite 8 + n
  146.       set the width of sprite 8 to the width of sprite 8 + n
  147.       updateStage()
  148.     end repeat
  149.     startTimer()
  150.     repeat while the timer < 50
  151.       nothing()
  152.     end repeat
  153.     set oldlevel to level
  154.     set level to level - random(level)
  155.     if gameover = 1 then
  156.       set level to 0
  157.     end if
  158.     set the soundEnabled to 1
  159.     if Rand_Sound = 1 then
  160.       puppetSound("hateitm")
  161.     end if
  162.     if Rand_Sound = 2 then
  163.       puppetSound("shutup.wav")
  164.     end if
  165.     if Rand_Sound = 3 then
  166.       puppetSound("uhoh2.wav")
  167.     end if
  168.     if Rand_Sound = 4 then
  169.       puppetSound("vfdsilly.wav")
  170.     end if
  171.     if Rand_Sound = 5 then
  172.       puppetSound("laughm04.wav")
  173.     end if
  174.     set the visible of sprite 21 to 1
  175.   end if
  176.   set the visible of sprite 22 to 0
  177.   set the visible of sprite 24 to 0
  178.   updateStage()
  179.   startTimer()
  180.   set the blend of sprite 16 to 0
  181.   set the visible of sprite 20 to 0
  182.   set the visible of sprite 21 to 0
  183.   set the visible of sprite 23 to 0
  184.   updateStage()
  185.   set counter to counter + 1
  186.   set the blend of sprite 37 to 0
  187.   set the blend of sprite 39 to 0
  188.   set the blend of sprite 47 to 0
  189.   if level < 0 then
  190.     set level to 0
  191.   end if
  192.   if level > oldlevel then
  193.     set vert to the locV of sprite 14
  194.     repeat with n = 1 to 15
  195.       set the locV of sprite 14 to vert - n
  196.       startTimer()
  197.       repeat while the timer < 3
  198.       end repeat
  199.       updateStage()
  200.     end repeat
  201.   else
  202.     if (level < oldlevel) and (oldlevel <> 0) then
  203.       repeat with x = 1 to oldlevel - level
  204.         set vert to the locV of sprite 14
  205.         repeat with n = 1 to 15
  206.           set the locV of sprite 14 to vert + n
  207.           startTimer()
  208.           repeat while the timer < 3
  209.           end repeat
  210.           updateStage()
  211.         end repeat
  212.       end repeat
  213.     end if
  214.   end if
  215.   set the visible of sprite 19 to 0
  216.   set the visible of sprite 22 to 0
  217.   set the visible of sprite 23 to 0
  218.   set the visible of sprite 24 to 0
  219.   updateStage()
  220.   if level > highest then
  221.     set highest to level
  222.   end if
  223.   if (level = 0) and (counter > 1) then
  224.     set plost to 1
  225.     set notend to 0
  226.     go("end")
  227.     exit
  228.   end if
  229.   if level = 20 then
  230.     set notend to 0
  231.     set pwon to 1
  232.     go("end")
  233.     exit
  234.   end if
  235.   if (counter = 60) and (level <> 20) then
  236.     set pend to 1
  237.     set notend to 0
  238.     go("end")
  239.     exit
  240.   end if
  241.   set the visible of sprite 22 to 0
  242.   set the visible of sprite 23 to 0
  243.   set the visible of sprite 24 to 0
  244.   set the visible of sprite 8 to 0
  245.   set the visible of sprite 19 to 0
  246.   set the visible of sprite 20 to 1
  247.   updateStage()
  248.   set the visible of sprite 20 to 0
  249.   updateStage()
  250.   set notend to 1
  251.   go("end")
  252. end
  253.