I am in the middle of creating a RPG Game and i am focusing on saving and loading.
What i need is a script that saves my characters exact location or possibly and “Auto-Save” feature. I am hoping to create a save game button for my pause menu.
The reason why i am asking this is because i have searched all over Google and found many results however the results was not what i needed and did not help me at all. I also have no idea where to start for the creating of Saving and Loading feature. I am also wanting a loading button for my main menu so when the user clicks the button it loads their game save.
I am sorry if this is irrating of asking the same question but i didn’t understand the other scripts and tutorials because i got many errors with them.
Thanks in advanced
UniqueProductionZ
Extra -
This is my pause menu script (I am in the middle of creating my main menu scene now:
private var pauseEnabled = false;
function Start()
{
pauseEnabled = false;
Time.timeScale = 1;
AudioListener.volume = 1;
Screen.showCursor = false;
}
function Update()
{
//check if pause button (escape key) is pressed
if(Input.GetKeyDown("escape"))
{
//check if game is already paused
if(pauseEnabled == true)
{
//unpause the game
pauseEnabled = false;
Time.timeScale = 1;
AudioListener.volume = 1;
Screen.showCursor = false;
}
//else if game isn't paused, then pause it
else if(pauseEnabled == false)
{
pauseEnabled = true;
AudioListener.volume = 0;
Time.timeScale = 0;
Screen.showCursor = true;
}
}
}//end Update function
function OnGUI()
{
if(pauseEnabled == true)
{
if(GUI.Button(Rect(Screen.width /2 - 100,Screen.height /2+25 ,250,50), "Option"))
{
Debug.Log("GUI.Button : Options : pressed");
}
if(GUI.Button(Rect(Screen.width /2 - 100,Screen.height /2-25 ,250,50), "Resume"))
{
if(pauseEnabled == true)
{
//unpause the game
pauseEnabled = false;
Time.timeScale = 1;
Screen.showCursor = false;
AudioListener.volume = 1;
}
}
}
}//end OnGUI function