|
| 08 Feb 2012 04:59 PM |
I'm making a count down for a flag capture (request for someone else), So i thought i could just use coroutines to have the countdown run simultaneously with the part of the script which checks who owns the flag/capturing and what nots. Anyways, the problem would be is i loose the ability to use the arguments in my function when using it as a coroutine. Any better way to do this?
function countDown(time,flagHolder) for i = time,0,-1 do if script.Parent.Parent.color.BrickColor ~= flagHolder then break end winTimer = i end end
local count = coroutine.create(countDown)
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|
Nicolas77
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 3158 |
|
| |
|
|
| 08 Feb 2012 05:13 PM |
color.BrickColor = the color of the flag flagHolder = the TeamColor who has the flag EX:
if script.Parent.Parent.color.BrickColor ~= "Bright blue" then
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 05:37 PM |
| My brain is just not functioning properly so I'm just gonna say do == no point of doing ~= if you dont know if it's not equal, oh wait actually never mind... |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 05:42 PM |
eh, yeah nvm. i decided to use variables instead. Now to get the rest of this script to work...
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|