home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / Panasonic- / funcity / paris / wave / HA_E.dcr / 00061.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  1.9 KB  |  109 lines

  1. global grun, gh, gjump, gaction, ghard, gscore
  2.  
  3. on initialize
  4.   set grun to 0
  5.   set gjump to 0
  6.   set gaction to 0
  7.   set ghard to 0
  8.   set gscore to 0
  9.   set gh to the locH of sprite 10
  10.   set the puppet of sprite 10 to 1
  11. end
  12.  
  13. on running
  14.   set grun to (grun + 1) mod 4
  15.   set the castNum of sprite 10 to the number of cast "run" + grun
  16.   updateStage()
  17. end
  18.  
  19. on runnermove
  20.   set grun to (grun + 1) mod 4
  21.   set the castNum of sprite 10 to the number of cast "run" + grun
  22.   set gh to gh - 16
  23.   set the locH of sprite 10 to gh
  24.   updateStage()
  25. end
  26.  
  27. on jumping
  28.   set gjump to (gjump + 1) mod 4
  29.   set the castNum of sprite 10 to the number of cast "jump" + gjump
  30.   updateStage()
  31.   if gaction = 4 then
  32.     set gaction to 0
  33.   else
  34.     set gaction to gaction + 1
  35.   end if
  36. end
  37.  
  38. on motion
  39.   if gaction = 1 then
  40.     jumping()
  41.   else
  42.     if gaction = 2 then
  43.       jumping()
  44.     else
  45.       if gaction = 3 then
  46.         jumping()
  47.       else
  48.         if gaction = 4 then
  49.           jumping()
  50.         else
  51.           running()
  52.         end if
  53.       end if
  54.     end if
  55.   end if
  56. end
  57.  
  58. on goalmotion
  59.   if gaction = 1 then
  60.     jumping()
  61.   else
  62.     if gaction = 2 then
  63.       jumping()
  64.     else
  65.       if gaction = 3 then
  66.         jumping()
  67.       else
  68.         if gaction = 4 then
  69.           jumping()
  70.         else
  71.           runnermove()
  72.         end if
  73.       end if
  74.     end if
  75.   end if
  76. end
  77.  
  78. on korobu
  79.   if sprite 10 intersects 3 then
  80.     puppetSound("ooh")
  81.     set grun to 0
  82.     go("oh")
  83.   end if
  84. end
  85.  
  86. on korobu2
  87.   if sprite 10 intersects 3 then
  88.     puppetSound("ooh")
  89.     set grun to 0
  90.     go("oh2")
  91.   end if
  92. end
  93.  
  94. on tokuten
  95.   global ghitoketa, gfutaketa
  96.   if gscore < 10 then
  97.     put 0 & gscore into field "tensu"
  98.   else
  99.     put gscore into field "tensu"
  100.   end if
  101.   puppetSprite(5, 1)
  102.   puppetSprite(6, 1)
  103.   set ghitoketa to char 1 of field "tensu"
  104.   set gfutaketa to char 2 of field "tensu"
  105.   set the castNum of sprite 5 to ghitoketa + 100
  106.   set the castNum of sprite 6 to gfutaketa + 100
  107.   updateStage()
  108. end
  109.