home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / devglry / ingenius / shockwav / quest.dcr / 00008.ls < prev    next >
Encoding:
Text File  |  1996-05-10  |  1.9 KB  |  65 lines

  1. on wintest
  2.   puppetSprite(48, 0)
  3.   go("done")
  4.   set the foreColor of sprite 41 to 255
  5.   set the backColor of sprite 41 to 0
  6.   set name to word 1 of the name of cast the castNum of sprite 41
  7.   if (the locH of sprite 41 < 100) or (the locH of sprite 41 > 300) then
  8.     set dh to 1
  9.   else
  10.     if (the locH of sprite 41 > 150) and (the locH of sprite 41 < 250) then
  11.       set dh to 1
  12.     else
  13.       set dh to 2
  14.     end if
  15.   end if
  16.   if the locH of sprite 41 < 210 then
  17.     repeat while the locH of sprite 41 < 210
  18.       set the castNum of sprite 41 to the number of cast (name && "stepRight1")
  19.       updateStage()
  20.       wait(20)
  21.       set the castNum of sprite 41 to the number of cast (name && "stepRight2")
  22.       set the locV of sprite 41 to the locV of sprite 41 - dh
  23.       set the locH of sprite 41 to the locH of sprite 41 + 12
  24.       updateStage()
  25.       wait(20)
  26.     end repeat
  27.   else
  28.     repeat while the locH of sprite 41 > 220
  29.       set the castNum of sprite 41 to the number of cast (name && "stepLeft1")
  30.       updateStage()
  31.       wait(20)
  32.       set the castNum of sprite 41 to the number of cast (name && "stepLeft2")
  33.       set the locV of sprite 41 to the locV of sprite 41 - dh
  34.       set the locH of sprite 41 to the locH of sprite 41 - 12
  35.       updateStage()
  36.       wait(20)
  37.     end repeat
  38.   end if
  39.   set the castNum of sprite 41 to the number of cast (name && "done")
  40.   updateStage()
  41.   put the locV of sprite 41
  42.   set the locH of sprite 39 to the locH of sprite 41
  43.   set the locV of sprite 39 to the locV of sprite 41
  44.   set the stretch of sprite 39 to 0
  45.   updateStage()
  46.   put the locV of sprite 39
  47.   cursor(0)
  48. end
  49.  
  50. on wait w
  51.   set t to the ticks
  52.   repeat while the ticks < (t + w)
  53.   end repeat
  54. end
  55.  
  56. on ruby
  57.   puppetSprite(39, 1)
  58.   if the foreColor of sprite 39 = 36 then
  59.     set the foreColor of sprite 39 to 0
  60.   else
  61.     set the foreColor of sprite 39 to the foreColor of sprite 39 + 1
  62.   end if
  63.   updateStage()
  64. end
  65.