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

  1. property cloud, spriteNum, location, direction, moveme, flippin
  2.  
  3. on getPropertyDescriptionList
  4.   return [#direction: [#comment: "yadda", #default: 0, #format: #integer, #range: [#min: -10, #max: 10]], #flippin: [#comment: "yadda", #default: 0, #format: #boolean]]
  5. end
  6.  
  7. on beginSprite me
  8.   cloud = sprite(spriteNum)
  9.   cloud.flipH = flippin
  10.   location = cloud.locH
  11.   moveme = timeout(string(spriteNum)).new(100, #goe, me)
  12. end
  13.  
  14. on goe me
  15.   location = cloud.locH
  16.   if (location > (0 - (cloud.width / 2))) and (location < (the stageRight - the stageLeft + (cloud.width / 2))) then
  17.     cloud.locH = location + direction
  18.   else
  19.     cloud.flipH = not cloud.flipH
  20.     direction = direction * -1
  21.     cloud.locH = location + direction
  22.   end if
  23. end
  24.