So, I am accessing variables in other scripts via unityscript. And since unityscript does not return variables to otherscripts, I have to manually program it. They are fighting eachother for the variables, or if I can get some to update one way, they wont retro update from original script, because the other script is correcting it.
Script 1 should be able to edit both variables (someint1) and (someint2), script 2 should be able to edit 1 variable (invariable1, script 3 should be able to edit 1 variable (intvariable2).
Note that basically, someint1 = invariable1, and someint2 = intvariable2.
The way I have it set up is
Script 1
var someint1 : int;
var someint2 : int;
function Start()
someint1 = somenumber;
someint2 = somenumber;
function Lateupdate()
someint1 = GetObject.Find(GameObject1).GetComponent(GameComponent1).intvariable1;
someint2 = GetObject.Find(GameObject2).GetComponent(GameComponent2).intvariable2;
Script2
var intvariable1 : int;
function Update()
intvariable1 = GetObject.Find(GameObject3).GetComponent(GameComponent3).someint1;
Script3
var intvariable2 : int;
function Update()
intvariable2 = GetObject.Find(GameObject3).GetComponent(GameComponent3).someint2;