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