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

  1. on mouseDown
  2.   global ans2, true_answer, Rand_Quest, guess, counter, checkcounter, n, level, m, scored, Rand_Sound, oldlevel, leveldiff, vert
  3.   set checkcounter to 1
  4.   puppetSound("click")
  5.   set the blend of sprite 46 to 60
  6.   set the blend of sprite 38 to 45
  7.   set the blend of sprite 39 to 45
  8.   set the visible of sprite 12 to 0
  9.   set the soundEnabled to 1
  10.   puppetSound(0)
  11.   updateStage()
  12.   set the visible of sprite 8 to 1
  13.   set the locV of sprite 8 to 250
  14.   repeat with n = 1 to 100
  15.     set the locH of sprite 8 to n
  16.     updateStage()
  17.   end repeat
  18.   set Rand_Sound to random(5)
  19.   if true_answer = "2" then
  20.     set the castNum of sprite 8 to 173
  21.     updateStage()
  22.     repeat with n = 1 to 50
  23.       set vert to the locV of sprite 8
  24.       set the locV of sprite 8 to vert - n
  25.       startTimer()
  26.       repeat while the timer < 2
  27.         nothing()
  28.       end repeat
  29.       updateStage()
  30.     end repeat
  31.     set the visible of sprite 8 to 0
  32.     set oldlevel to level
  33.     set level to level + 1
  34.     set leveldiff to oldlevel - level
  35.     set the soundEnabled to 1
  36.     if Rand_Sound = 1 then
  37.       puppetSound("yesm")
  38.     end if
  39.     if Rand_Sound = 2 then
  40.       puppetSound("vfexllnt.wav")
  41.     end if
  42.     if Rand_Sound = 3 then
  43.       puppetSound("vfyes.wav")
  44.     end if
  45.     if Rand_Sound = 4 then
  46.       puppetSound("vmcorrct.wav")
  47.     end if
  48.     if Rand_Sound = 5 then
  49.       puppetSound("clapwoop.wav")
  50.     end if
  51.     set scored to scored + 1
  52.     set the visible of sprite 20 to 1
  53.   end if
  54.   if true_answer <> "2" then
  55.     set the castNum of sprite 8 to 174
  56.     updateStage()
  57.     repeat with n = 1 to 50
  58.       set vert to the locV of sprite 8
  59.       set the locV of sprite 8 to vert + n
  60.       startTimer()
  61.       repeat while the timer < 2
  62.         nothing()
  63.       end repeat
  64.       updateStage()
  65.     end repeat
  66.     set oldlevel to level
  67.     set level to level - random(level - 1)
  68.     set leveldiff to oldlevel - level
  69.     set the soundEnabled to 1
  70.     if Rand_Sound = 1 then
  71.       puppetSound("hateitm")
  72.     end if
  73.     if Rand_Sound = 2 then
  74.       puppetSound("shutup.wav")
  75.     end if
  76.     if Rand_Sound = 3 then
  77.       puppetSound("uhoh2.wav")
  78.     end if
  79.     if Rand_Sound = 4 then
  80.       puppetSound("vfdsilly.wav")
  81.     end if
  82.     if Rand_Sound = 5 then
  83.       puppetSound("laughm04.wav")
  84.     end if
  85.     set the visible of sprite 21 to 1
  86.   end if
  87.   set the visible of sprite 4 to 0
  88.   set the visible of sprite 6 to 0
  89.   updateStage()
  90.   startTimer()
  91.   set true_answer to 0
  92.   set the visible of sprite 4 to 1
  93.   set the visible of sprite 6 to 1
  94.   set the visible of sprite 21 to 0
  95.   set the visible of sprite 20 to 0
  96.   set the visible of sprite 5 to 1
  97.   set the visible of sprite 32 to 0
  98.   set the blend of sprite 15 to 0
  99.   set checkcounter to 1
  100.   set counter to counter + 1
  101.   updateStage()
  102.   puppetSound(0)
  103.   set the blend of sprite 38 to 0
  104.   set the blend of sprite 39 to 0
  105.   set the blend of sprite 46 to 0
  106.   if level < 0 then
  107.     set level to 0
  108.   end if
  109.   if level = 0 then
  110.     go("lose")
  111.   end if
  112.   if level = 3 then
  113.     go("win")
  114.   end if
  115.   if level = 0 then
  116.     set the locV of sprite 14 to 300
  117.   else
  118.     set vert to the locV of sprite 14
  119.     repeat with n = 1 to 15
  120.       set the locV of sprite 14 to vert - n
  121.       startTimer()
  122.       repeat while the timer < 3
  123.       end repeat
  124.       updateStage()
  125.     end repeat
  126.   end if
  127.   updateStage()
  128.   go("s")
  129.   set soundEnabled to 0
  130.   set Rand_Sound to 10
  131. end
  132.