SendMessage to new scene?

Hello, i have two scenes, and two scripts. And i need from scene1 SendMessge to function in script in scene2. Please help…
Part of the script in scene1

   if(GUI.Button (Rect (500,500,50,20), "Vytvoř")){

   		gameObject.Find("player").SendMessage("loadgame");
   }

Part of the script in scene2

function loadgame(){

	load = true;

	Application.LoadLevel("Mapa2");

}

I don’t think it’s possible to execute code in a scene thats not loadad… because… it’s not loaded.
But you can save values from your current scene to be carried over once the next scene is loaded.

But all that is kinda new to me.

How does it do?

I need this or when scene2 is loaded load = true;

How can i do: when scene2 is loaded load = true? And write it in script in scene2?

I tested write load = true; in Start function, but it don’t work

Now it load game, but it loading game every time. And i don’t know why.

function Update ()



{

	savegame();

	load = true;

I have been told that static variables are consistent through out the entire game, from level to level. So… if this is true, why not just set a var? And on the new scene loaded, if var is true (var was set in the last scene) that x will happen?

Take a look at DontDestroyOnLoad( GameObject )

Thanks now it works!