Is it possible to call update function from another function??

hi all,

I want to know that is it possible to call update from another function???

If it is possible means how can i pass values as arguments into update....i have tried that but it shows "Update can not take arguments"...

I want to know alternative way for this??

Can any one suggest your answer...

Thanks in advance.

Put the code you have in Update into a new function. That new function can have arguments in it.

Then replace the code in Update to simply just calling that function.

Here is an example: Script B accesses 2 variables in Script A and changes them and Update function in A is endlessly executing the function with changed arguments.

ScriptA

static var value1:int;
static var value2:int;

function Update(){

 MyFunction(value1, value2);

}

function MyFunction(v1:int,v2:int) {

 Do something here...

}

ScriptB

function OnMouseDown(){
 ScriptA.value1 = 10;
 ScriptB.value2 = 20;
}