Hi there i have a scene where i have boarders to load to another scene and a cave in the middle to load a cave scene, only it doesn’t work… iv done the scripts and tagged the right colliders for when the character hits it but the problem is it only loads one of the levels even though one of the colliders is tagged as Level_Load_caves_01. I cant think of the reason why this could be?
Here are my scripts, script one is to go to SP :
using UnityEngine;
using System.Collections;
public class Load_Level_wastelands_01 : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter (Collider other)
{
if (other.tag == “level_load_wastelands_01”);
{
Application.LoadLevel(“SP”);
}
}
}
script two to go to Caves :
using UnityEngine;
using System.Collections;
public class Load_Level_Cave_01 : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter (Collider other)
{
if (other.tag == “level_load_Cave_01”);
{
Application.LoadLevel(“Cave_01”);
}
}
}
Both are attached to the character but they both only work without the other one, so then i thought i would combine them into one as follows :
using UnityEngine;
using System.Collections;
public class Load_Level_wastelands_0 : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter (Collider other)
{
if (other.tag == “level_load_Cave_01”);
{
Application.LoadLevel(“Cave_01”);
}
{
if (other.tag == “level_load_wastelands_01”);
{
Application.LoadLevel(“SP”);
}
}
}
}
But no luck either, big headache, any help would be appreciated, thanks.