Multiple Scene Switching on one script!

Hi there! Me and my friend have made a dot game so when the red one is clicked the game loads lvl : Main Menu and when a blue dot is clicked it loads the next level.So far i got 2 levels so everything works fine but how do i add on the same object another script so when it is clicked it loads the next lvl?Because here is my code :

void OnMouseDown()
   {
     Application.LoadLevel("Level 2");
   }

.

But i want the blue dot to load level 3 for example when it’s clicked in level 2 and so on.How do i do that?Please help me thanks!

You could try using something like:
Let me know if this works as im not certain.

using UnityEngine;
using System.Collections;

public class LoadNextLevel : MonoBehaviour
{
    public int CurrentlyLoadedLevel;

    void Awake()
    {
        CurrentlyLoadedLevel = Application.loadedlevel;
    }

    void OnMouseDown()
    {
        Application.LoadLevel (CurrentlyLoadedLevel + 1);
    }
}

I get an error saying that unity.application does not contain a definition for loaded level!

If it’s all 2d stuff just add some buttons to them. Then add the button functions like this

public void StartLevel1()
{
   Application.LoadLevel("LevelName")
}

public void StartLevel2()
{
   Application.LoadLevel("LevelName")
}

public void StartLevel3()
{
   Application.LoadLevel("LevelName")
}

Then put it on a empty gameobject on every scene, link the buttons up. However don’t use this in a actual game cause it’s really easy to hack and people would just skip through the game. That’s where button listeners come in pretty good.

isn’t there something safer? Because i don’t know anything about buttons but i will try to work it out!

Yes using gameobject.find and make variables private. If you only run it at start and once with few buttons you won’t even notice it.