Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 17 Jul 2011 05:33 PM |
local Timer = coroutine.create( function() repeat print(Time) wait(1) Time = Time - 1 until Time < 1 end)
wait(5)
coroutine.abort()???
How do I stop that? |
|
|
| Report Abuse |
|
|
OBF
|
  |
| Joined: 29 Sep 2009 |
| Total Posts: 10709 |
|
| |
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
| |
|
|
| 17 Jul 2011 05:52 PM |
continuously stop the running coroutine?
while true do wait(3) coroutine.yield(corout) end ? |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 17 Jul 2011 05:55 PM |
I want to have a Timer running inside this script
So that it will continually tick down unless stopped
Unless somewhere in the script coroutine.yield(cor) is called |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2011 06:00 PM |
| Ok, so add an if statement that checks for whatever and if it returns true, yield the coroutine. |
|
|
| Report Abuse |
|
|