home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / devglry / toppanmk / source / nasu.dir / 00002.ls < prev    next >
Encoding:
Text File  |  1996-05-08  |  2.4 KB  |  122 lines

  1. global ganswer, gchangecount, gchangetempo
  2.  
  3. on init
  4.   set ganswer to 2
  5.   set gchangecount to 1
  6.   put gchangecount - 1 into field "POINT"
  7.   set gchangetempo to 10
  8.   puppetTempo(gchangetempo)
  9. end
  10.  
  11. on doanswer
  12.   if the frame = 1 then
  13.     exit
  14.   end if
  15.   set spnum to clickOn()
  16.   set myanswer to spnum - 10
  17.   if myanswer = ganswer then
  18.     playsound(25)
  19.     set gchangecount to gchangecount + 1
  20.     put gchangecount - 1 into field "POINT"
  21.     repeat with i = 1 to 3
  22.       set the castNum of sprite spnum to 14
  23.       updateStage()
  24.       wait(10)
  25.       set the castNum of sprite spnum to 15
  26.       updateStage()
  27.       wait(10)
  28.     end repeat
  29.     set the castNum of sprite spnum to 13
  30.     updateStage()
  31.     waitsound()
  32.     wait(30)
  33.     set gchangetempo to gchangetempo + 1
  34.     puppetTempo(gchangetempo)
  35.     changenasu()
  36.     pause()
  37.   else
  38.     set the castNum of sprite spnum to 16
  39.     playsound(26)
  40.     waitsound()
  41.     set the castNum of sprite (ganswer + 10) to 15
  42.     playsound(24)
  43.     waitsound()
  44.     wait(30)
  45.     set the castNum of sprite spnum to 13
  46.     set the castNum of sprite (ganswer + 10) to 13
  47.     updateStage()
  48.     wait(10)
  49.     go(1)
  50.   end if
  51. end
  52.  
  53. on startgame
  54.   pushbtnmove()
  55.   set ganswer to 2
  56.   set gchangecount to 1
  57.   put gchangecount - 1 into field "POINT"
  58.   set gchangetempo to 10
  59.   puppetTempo(gchangetempo)
  60.   waitsound()
  61.   changenasu()
  62. end
  63.  
  64. on settempo
  65.   puppetTempo(gchangetempo)
  66. end
  67.  
  68. on changenasu
  69.   set the castNum of sprite 12 to 15
  70.   playsound(24)
  71.   waitsound()
  72.   set the castNum of sprite 12 to 13
  73.   updateStage()
  74.   set ganswer to 2
  75.   repeat with i = 1 to gchangecount
  76.     set change to random(3)
  77.     play frame string(change)
  78.     if ganswer = 1 then
  79.       if change = 1 then
  80.         set ganswer to 2
  81.       else
  82.         if change = 2 then
  83.           nothing()
  84.         else
  85.           if change = 3 then
  86.             set ganswer to 3
  87.           end if
  88.         end if
  89.       end if
  90.       next repeat
  91.     end if
  92.     if ganswer = 2 then
  93.       if change = 1 then
  94.         set ganswer to 1
  95.       else
  96.         if change = 2 then
  97.           set ganswer to 3
  98.         else
  99.           if change = 3 then
  100.             nothing()
  101.           end if
  102.         end if
  103.       end if
  104.       next repeat
  105.     end if
  106.     if ganswer = 3 then
  107.       if change = 1 then
  108.         nothing()
  109.         next repeat
  110.       end if
  111.       if change = 2 then
  112.         set ganswer to 2
  113.         next repeat
  114.       end if
  115.       if change = 3 then
  116.         set ganswer to 1
  117.       end if
  118.     end if
  119.   end repeat
  120.   go("M")
  121. end
  122.