Saving Items
Re: Saving Items
Seems Like SaveGamePanel.cs can save an item and the item still on inventory when you continue the game but SaveHelper.cs can't save an item. The item vanished when you continue the game
I hope that you can help me to my problem, Thankyou in advance
I hope that you can help me to my problem, Thankyou in advance
Re: Saving Items
Please undo all script changes. Then, as a quick test, in SaveHelper's SaveGameNow method, change SaveSystem.SlotToSlot to SaveSystem.SaveToSlotImmediate:
If this works, you can make a subclass of SaveHelper, like MyCustomSaveHelper, that overrides this method. Roughly:
and replace the SaveHelper script on your MenuSystem with your custom class.
Code: Select all
public virtual void SaveGameNow(int slotNum)
{
SaveSystem.SaveToSlotImmediate(slotNum);
PlayerPrefs.SetString(GetSlotSummaryKey(slotNum), GetCurrentSummary(slotNum));
...
If this works, you can make a subclass of SaveHelper, like MyCustomSaveHelper, that overrides this method. Roughly:
Code: Select all
public class MyCustomSaveHelper : SaveHelper
{
public override void SaveGameNow(int slotNum)
{
SaveSystem.SaveToSlotImmediate(slotNum);
PlayerPrefs.SetString(GetSlotSummaryKey(slotNum), GetCurrentSummary(slotNum));
PlayerPrefs.SetString(GetSlotDetailsKey(slotNum), GetCurrentDetails(slotNum));
PlayerPrefs.SetInt(GetLastSavedGameKey(), slotNum);
}
}
Re: Saving Items
It Workeeedddd!!! Thankyouuuusooomuchhh Tonyy
Re: Saving Items
Hi Tony, How do i add 2 more quest in one npc conversation using DS
Like in my first quest: Get 5 potions
2nd Quest: Collect 5 Lumber jack
3rd Quest: Collect 5 horns
Like in my first quest: Get 5 potions
2nd Quest: Collect 5 Lumber jack
3rd Quest: Collect 5 horns
Re: Saving Items
Write a conversation with multiple branches that check those quest states.
Re: Saving Items
Hi Tony, I have some issues with invector items like a sword. I placed a sword gameobject and equipped it in the gameworld, and when I continue on the main menu, the sword is still there in the gameworld where the sword is located. How can I save the item that doesn't come back once it's taken? Thankyouu!
Re: Saving Items
Hi,
Add a DestructibleSaver component to the sword, assign a unique Key, and set its dropdown to OnDisable.
Add a DestructibleSaver component to the sword, assign a unique Key, and set its dropdown to OnDisable.
Re: Saving Items
Hi tony , I have some issues with the title menu panel when I stop the game and open it. The continue button and new game button appear even though I don't have any game progress.
How can I integrate a function where the continue and new game button only shows up when I have game progress on it?
How can I integrate a function where the continue and new game button only shows up when I have game progress on it?
Re: Saving Items
Those buttons appear because you have a saved game. You must delete the saved game using the Load Game menu.