I have a simple next scene script that I want to activate when two separate characters (with the tag Player2) reach two separate locations (that are collision based.) The problem is, the next scene will load when only one character reaches one location. I have tried create an empty game object and had both goal scenes child it . When I attached the script, the collision only worked with the empty game objects location. Any help would be amazing, here is the script:
using UnityEngine;
using System.Collections;
public class NextScene : MonoBehaviour {
void OnTriggerEnter2D(Collider2D other)
{
//if (other.gameObject.tag == "Player")
{
if (other.gameObject.tag == "Player2")
{
Application.LoadLevel ("level2");
}
}
}
}