When one person moves it animates all people on the server.
This is making everyone walk!
var view : NetworkView;
@RPC
function walk() { //this function is called when a user presses w
//print(networkView.viewID);
view = NetworkView.Find(networkView.viewID);
view.gameObject.transform.networkView.RPC("isWalking", RPCMode.All);
}
isWalking just sets a boolean isWalking to true for a specific player object. This is doing it to all of them and I am not sure why!
Also I am getting this usse, perhaps it is related?
NullReferenceException: Object reference not set to an instance of an object
networkmanager.spawnPlayer () (at Assets/scripts/networkmanager.js:60)
function spawnPlayer() { //occurs onConnection and onInitialization
var viewID = Network.AllocateViewID();
var clone : Transform;
clone = Network.Instantiate(playerPrefab, spawnObject.position, Quaternion.identity, 0) as Transform;
var nView: NetworkView;
nView = clone.GetComponent(NetworkView); //THIS IS THE LINE WITH THE ERROR
nView.viewID = viewID;
}