home *** CD-ROM | disk | FTP | other *** search
/ Stickerpedia Stickerbook / Stickerbook.iso / pc / DATA / objects.cxt / 00031_Script_oTimer < prev    next >
Text File  |  2003-03-19  |  860b  |  56 lines

  1. --¨
  2. oTimer
  3.  
  4.  
  5.  
  6.  
  7. global oTimer, oHQ
  8.  
  9.  
  10. property pStartTicks        -- the ticks when timer wa started
  11. property pEndTicks          -- the ticks when the timer is going to be finished
  12. property pTimeUp            -- is set to 1 once pEndTicks equals or is bigger than the ticks
  13. property pMyName
  14.  
  15.  
  16. on new me
  17.   set pMyName = "oTimer"
  18.   add the actorlist, me
  19.   -- addObject me, 1
  20.   -- updateProgressBar ("Object loading", oTimer && "status #ok")
  21.   
  22.   return me  
  23. end
  24.  
  25.  
  26.  
  27.  
  28.  
  29. on showProps me, outPutTo
  30.   showProps oHQ, me, outPutTo
  31. end
  32.  
  33.  
  34. on stepFrame me
  35.   if pEndTicks <= the ticks then set pTimeUp = 1
  36. end
  37.  
  38.  
  39. on start me, timerLength
  40.   set pStartTicks = the ticks
  41.   set pEndTicks = pStartTicks + timerLength
  42.   set pTimeUp = 0
  43. end
  44.  
  45.  
  46.  
  47. on chkTime me
  48.   return pTimeUp
  49. end
  50.  
  51.  
  52.  
  53. on delete me
  54.   deleteOne(the actorList,me)
  55. end
  56.