C# networking - static variable

Hello guys,

I have a static variable for a simple networking game i’m making the represents a character’s level that i’m displaying above their head.
The problem is that when I have two characters in the scene the other character displays the the first player’s level. It looks like it just isnt sending the message correctly?

Here’s the RPC I have set up: TimeText.currentOverAllLevel

	void OnTriggerEnter(Collider other)
	{
		photonView.RPC("UpdateCharacterLevel", PhotonTargets.All, "2");
	}

	[RPC]
	void UpdateCharacterLevel(int addLevel, PhotonMessageInfo info){
		TimeText.currentOverAllLevel += addLevel;
		Debug.Log ("All the other players should know!");
	}

Thanks for any thoughts!
Chris

If both players use the same script the value of the static variable will always be the same for both of them. That’s the way statics work… 1 variable for the class, not 1 variable per instance. Convert it to an instance variable and you can have different values for each instance, or character in this case.