home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / BlindAlleys.dxr / Internal_18_rat.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  376 b   |  18 lines

  1. property rat, spriteNum, direc, motion
  2.  
  3. on beginSprite me
  4.   rat = sprite(spriteNum)
  5.   direc = 8.5
  6.   motion = timeout("ll").new(20, #moveit, me)
  7. end
  8.  
  9. on moveit me
  10.   if (rat.locH > 30) and (rat.locH < (the stageRight - the stageLeft - 30)) then
  11.     rat.locH = rat.locH + direc
  12.   else
  13.     rat.flipH = not rat.flipH
  14.     direc = -direc
  15.     rat.locH = rat.locH + direc
  16.   end if
  17. end
  18.