home *** CD-ROM | disk | FTP | other *** search
/ A Virtual Reality Guide to Texas / CD.iso / texdata / arcextra / ghost.dir / 00005.ls < prev    next >
Encoding:
Text File  |  1998-05-18  |  1.1 KB  |  43 lines

  1. on exitFrame
  2.   global score
  3.   timer(10)
  4.   puppetSprite(11, 1)
  5.   set MoveSprite to 7
  6.   set MoveSprite2 to 2
  7.   set mH to the mouseH
  8.   set mV to the mouseV
  9.   set SpriteLH to the locH of sprite MoveSprite
  10.   set LBound to 55
  11.   set LRegion to 100
  12.   set RBound to 600
  13.   set RRegion to 540
  14.   puppetSprite(MoveSprite, 1)
  15.   puppetSprite(MoveSprite2, 1)
  16.   if mH <= LRegion then
  17.     set HOffset to LRegion - mH
  18.     set NewLH to SpriteLH - HOffset
  19.     if NewLH > LBound then
  20.       set the locH of sprite MoveSprite to NewLH
  21.       set the locH of sprite MoveSprite2 to NewLH
  22.     else
  23.       set the locH of sprite MoveSprite to LBound
  24.       set the locH of sprite MoveSprite2 to LBound
  25.     end if
  26.   else
  27.     if mH >= RRegion then
  28.       set HOffset to RRegion - mH
  29.       set NewLH to SpriteLH - HOffset
  30.       if NewLH < RBound then
  31.         set the locH of sprite MoveSprite to NewLH
  32.         set the locH of sprite MoveSprite2 to NewLH
  33.       else
  34.         set the locH of sprite MoveSprite to RBound
  35.         set the locH of sprite MoveSprite2 to RBound
  36.       end if
  37.     end if
  38.   end if
  39.   set tempH to random(640)
  40.   puppetSprite(3, 1)
  41.   go(the frame)
  42. end
  43.