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 / tokyo / slot.dcr / 00085_DEMO.ls < prev    next >
Encoding:
Text File  |  2017-09-21  |  1.9 KB  |  86 lines

  1. on initdemo
  2.   global gheadlist, gbodylist, gleglist, gslt, glpr, glpl
  3.   set gheadlist to [14, 15, 16, 17]
  4.   set gbodylist to [18, 19, 20, 21]
  5.   set gleglist to [22, 23, 24, 25]
  6.   set gslt to [2, 1, 1, 2, 3, 3, 0, 1]
  7.   set glpr to [1, 0, 0, 0, 2, 0, 0, 0]
  8.   set glpl to [2, 0, 0, 0, 1, 0, 0, 0]
  9.   repeat with i = 14 to 29
  10.     set the puppet of sprite i to 1
  11.   end repeat
  12. end
  13.  
  14. on cleardemo
  15.   repeat with i = 1 to 6
  16.     set the puppet of sprite i to 0
  17.   end repeat
  18.   repeat with i = 14 to 29
  19.     set the puppet of sprite i to 0
  20.   end repeat
  21. end
  22.  
  23. on lampdemo
  24.   global glpr, glpl
  25.   set glpr to updemo(1, glpr)
  26.   set glpl to updemo(2, glpl)
  27. end
  28.  
  29. on updemo i, list
  30.   set k to 13
  31.   if i = 2 then
  32.     set k to 21
  33.   end if
  34.   set l to getAt(list, 1)
  35.   repeat with j = 2 to 8
  36.     setAt(list, j - 1, getAt(list, j))
  37.   end repeat
  38.   setAt(list, 8, l)
  39.   repeat with j = 1 to 8
  40.     set the castNum of sprite (k + j) to getAt(list, j) + 28
  41.   end repeat
  42.   return list
  43. end
  44.  
  45. on movedemo
  46.   global gheadlist, gbodylist, gleglist
  47.   updatedemo(1, gheadlist)
  48.   updatedemo(2, gbodylist)
  49.   updatedemo(3, gleglist)
  50.   updateStage()
  51. end
  52.  
  53. on updatedemo i, list
  54.   global gslt
  55.   set i to i * 2
  56.   set j to getAt(gslt, i - 1)
  57.   set k to getAt(gslt, i)
  58.   if j <> 1 then
  59.     if j = 0 then
  60.       setAt(gslt, i - 1, 3)
  61.       set j to 3
  62.       set k to k + 1
  63.       if k > 4 then
  64.         set k to 1
  65.       end if
  66.       setAt(gslt, i, k)
  67.     else
  68.       setAt(gslt, i - 1, j - 1)
  69.     end if
  70.     set l to k - 1
  71.     if l < 1 then
  72.       set l to 4
  73.     end if
  74.     set the castNum of sprite (i - 1) to getAt(list, l)
  75.     set the locH of sprite (i - 1) to 295 - ((4 - j) * 18)
  76.     set the castNum of sprite i to getAt(list, k)
  77.     set the locH of sprite i to 295 + (j * 18)
  78.   else
  79.     setAt(gslt, i - 1, 0)
  80.     set the castNum of sprite (i - 1) to getAt(list, k)
  81.     set the locH of sprite (i - 1) to 295
  82.     set the castNum of sprite i to getAt(list, k)
  83.     set the locH of sprite i to 295
  84.   end if
  85. end
  86.