Jump to content




running a timer in the background


  • You cannot reply to this topic
5 replies to this topic

#1 Exerro

  • Members
  • 801 posts

Posted 25 June 2012 - 06:56 PM

I'm trying to make a game where you do something and it starts a timer then you can go and do other things but the timer still runs in the background but idk how to do it...any help???

#2 kazagistar

  • Members
  • 365 posts

Posted 25 June 2012 - 06:59 PM

The wiki is your friend: http://computercraft...le=OS_%28API%29

#3 Exerro

  • Members
  • 801 posts

Posted 25 June 2012 - 07:05 PM

but would os.startTimer(840) work in the background...I'm not on my pc so I can't check

#4 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 25 June 2012 - 07:40 PM

Yes, it will run in the background, and when it times out it fires a "timer" event.

#5 Exerro

  • Members
  • 801 posts

Posted 25 June 2012 - 08:14 PM

View PostMysticT, on 25 June 2012 - 07:40 PM, said:

Yes, it will run in the background, and when it times out it fires a "timer" event.
how can you use/detect the timer event after it times out

#6 kazagistar

  • Members
  • 365 posts

Posted 25 June 2012 - 08:25 PM

Its all there on that wiki page. os.pullEvent("timer")





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users