heyy everyone i have been trying to make a save load script but it just isn’t working.
here is the code i have if anyone can tell me what i am doing wrong i would much appreciate it.
#save script
function OnTriggerEnter (other : Collider)
{
PlayerPrefs.SetFloat("X",transform.position.x);
PlayerPrefs.SetFloat("Z",transform.position.z);
}
#load script
function OnTriggerEnter (other : Collider)
{
PlayerPrefs.GetFloat("X");
PlayerPrefs.GetFloat("Y");
Application.LoadLevel(1);
}
with the load script i plan on having it as a button and not a trigger zone but this is just a test
and also if anyone knows how to make it load a scene through player prefs then that would be great ( what i mean is like it saves which scene im on in the save script and then loads that scene in the load script so then its just like when a player hits the load button it loads the level and position they were at.)
thanks for all the future help.