Is it possible to switch back and forth between functions?
The first function starts the second, then the second starts the first.

Code:
function test1()
{
	blah blah;
	function test0(); //this wouldn't work
}

function test0()
{
	blah blah;
	function test1();
}




I thought of a way to do it but I am not sure how this affects memory, because my

models react different now. Here is what I tried:

Code:
while(1)
{
	//timer to switch direction functions
	if (myTimer == 0)
	{
		randomize();
		wait(random(20));
		myTimer = 1;
	}
	else
	{
		randomize();
		wait(random(20));
		myTimer = 0;
	}
	wait(1);
}


if (myTimer == 0)
{function test0();}
else {function test1();}



Is this method ok, or does it use too much memory? If it does, is there a better way?

Or back to my first question - Is it possible to switch back and forth between

functions?