home *** CD-ROM | disk | FTP | other *** search
/ Car Screensaver - Toyota / TOYOTA.iso / mjparty / qh_demo.exe / DEMOHNT2.DXR / 00011.ls < prev    next >
Encoding:
Text File  |  1996-08-09  |  1.8 KB  |  92 lines

  1. on exitFrame
  2.   global gflag1, gnum1, gvar1
  3.   puppetSound(3, gnum1 + 500)
  4.   puppetSprite(6, 1)
  5.   if gflag1 > 30 then
  6.     coverdis(30)
  7.   else
  8.     coverdis(gflag1)
  9.   end if
  10.   if gflag1 > 30 then
  11.     set the locV of sprite 6 to 78
  12.     coverdis(gflag1 - 30)
  13.   end if
  14.   if gvar1 = 1 then
  15.     compansh()
  16.   end if
  17.   repeat while soundBusy(3)
  18.     nothing()
  19.   end repeat
  20.   puppetSound(3, 55)
  21.   repeat while soundBusy(3)
  22.     if random(500) = 500 then
  23.       compansh()
  24.       exit repeat
  25.     end if
  26.   end repeat
  27.   compansh()
  28. end
  29.  
  30. on coverdis num
  31.   set num to num * 3
  32.   repeat with c = 1 to num
  33.     startTimer()
  34.     set bh to 45 + (6 * c)
  35.     repeat with n = 1 to 3
  36.       set the locH of sprite 6 to bh + (n * 2)
  37.       updateStage()
  38.     end repeat
  39.     repeat while the timer < 3
  40.       nothing()
  41.     end repeat
  42.   end repeat
  43. end
  44.  
  45. on compansh
  46.   global gvar1
  47.   set gvar1 to random(4) - 1
  48.   ansh(gvar1)
  49.   abort()
  50. end
  51.  
  52. on ansh num
  53.   cursor(200)
  54.   set uc to the castNum of sprite (num + 8)
  55.   set the castNum of sprite (num + 8) to uc + 10
  56.   updateStage()
  57.   waith(15)
  58.   puppetSound(3, 54)
  59.   set the castNum of sprite (num + 8) to uc + 20
  60.   puppetSprite(7, 1)
  61.   puppetSprite(12, 1)
  62.   set the locH of sprite 7 to 556 - (num * 156)
  63.   set the locH of sprite 12 to 505 - (num * 156)
  64.   updateStage()
  65.   waith(15)
  66.   set the castNum of sprite 12 to 165
  67.   updateStage()
  68.   sameend()
  69.   waitsnd()
  70.   puppetSound(3, num + 69)
  71. end
  72.  
  73. on sameend
  74.   global gnum1, gflag1
  75.   puppetSprite(4, 0)
  76.   puppetSprite(6, 0)
  77.   set alist to [random(3)]
  78.   repeat with n = 1 to 2
  79.     set num to random(3)
  80.     if getOne(alist, num) = 0 then
  81.       append(alist, num)
  82.       next repeat
  83.     end if
  84.     set n to n - 1
  85.   end repeat
  86.   set gflag1 to getOne(alist, 1)
  87.   repeat with n = 1 to 3
  88.     puppetSprite(n + 40, 1)
  89.     set the castNum of sprite (n + 40) to (gnum1 * 4) + 517 + getAt(alist, n)
  90.   end repeat
  91. end
  92.