Hello
I have a character selection page, where both of my characters are tagged as player
when they go to the next scene, one of the characters works with the script while if i select the other character, the code does not work. The code searches for the tag ‘player’ to allow things to manipulate. only 1 character works. both have the same scripts attached. Does anyone know what ive done wrong?
// Use this for initialization
void Start () {
playerOBJ = GameObject.FindWithTag("Player");
playerScript = playerOBJ.GetComponent<PlayerController>();
float xPos = Screen.width - 950;
float yPos = Screen.height * 0.4f;
GameObject.Find ("_NotePad").guiTexture.pixelInset=new Rect(xPos,yPos,275,200);
}
int monitor = 0;
void Update () {
if(playerScript.questionNumber > monitor){
a = Random.Range(1,5);
b = Random.Range(1,5);
string s_a = a.ToString();
string s_b = b.ToString();
GameObject.Find("GUI-questions").guiText.text = a + " + " + b;
monitor++;
}