I have a JS script with only a static function that is invoked once and that then does many things until a timer has finished counting.
static var counter : int ;
//which is controlled by the
static function counting () :float
{
counter +1,
do stff
}
I want to call the counting function as a coroutine, so that when i call it, the static var count is an independent variable for every instance that the coroutine is called.
how can i run the code and the counter from other scripts? because var counter is not instanced.