@Klimber
I made a stupid mistake. Now it should work:
JavaScript:
var ID = prompt("Save file ID to save to: ")
var saveContents = prompt("Save file contents: ")
if (saveContents!=null){
StorageManager.saveToWebStorage1 = function(ID, saveContents){
var key = this.webStorageKey(ID)
localStorage.setItem(key, saveContents);
}
StorageManager.saveToWebStorage1(ID, saveContents);
}
else{alert("Save Contents is null. Data won't be saved.");}
Instructions are same as before.
NOTE!!! Global was not overwriting for some reason... It's saved and you can still read it with localStorage.getItem but it's not working for the game itself... so
your players will need to make a save first and then use this script to overwrite that save (same save slot) i.e they can't save to a completely new save slot. That save slot must have prior saves.
Those popup windows could be of three types afaik. Alert, prompt and confirm. If you want to get input from the player, you can use prompt. If you just want to give them a message, you can use alert. And confirm is for ok cancel sorta stuff. I don't really like these as they're a seperate window outside the game. So they sorta break immersion.
Anyways, for prompt, it's like,
JavaScript:
var x = prompt("message");
The message you want to give the player is shown and their input is stored to a variable (here, it's x). The variable can be a game variable too.