Page 1 of 1

Playmaker save/load

Posted: Thu May 13, 2021 5:31 am
by pewldo
Hi.

I am trying to save/load dialogue system related data by using playmaker functions. Everything is working fine when I save and load while the scene is playing. However it does not store the string variable. When trying to load data that was saved during an earlier playthrough I get this message; Save : FSM : load : LoadGame : Saved game data is an empty string

Can anyone attempt to explain how I store this data?

I was a bit unsure where to post this question, is it better posted on playmakers forums?

Thank you

Re: Playmaker save/load

Posted: Thu May 13, 2021 8:33 am
by Tony Li
Hi,

If you set up the Dialogue System's Save System, the Dialogue System's Save Game action will save the game to a storage destination such as disk or PlayerPrefs.

If you don't want to set up the Save System, you must store the string yourself. You can use PlayMaker's PlayerPrefs actions to store it in PlayerPrefs.

Re: Playmaker save/load

Posted: Thu May 13, 2021 9:07 am
by pewldo
Hi

Thank you for your answer.

I have set up the save dialogue system and using the Demo UI it does indeed work flawlessly. It is when I try to load the game with the load game action in playmaker that I get the error.

Re: Playmaker save/load

Posted: Thu May 13, 2021 9:11 am
by Tony Li
Hi,
pewldo wrote: Thu May 13, 2021 9:07 amI have set up the save dialogue system and using the Demo UI it does indeed work flawlessly. It is when I try to load the game with the load game action in playmaker that I get the error.
Do you get the error in the demo when loading?

Re: Playmaker save/load

Posted: Thu May 13, 2021 9:58 am
by pewldo
I am speaking here of the Demo Menu script that can be attached to the Dialogue Manager.

When using that Demo Menu to save/load it works. It is only when I attempt to save and load through playmaker actions that I get the error.
saveload.png
saveload.png (273.99 KiB) Viewed 1084 times

Re: Playmaker save/load

Posted: Thu May 13, 2021 10:28 am
by Tony Li
Hi,

Thanks for the screenshot. Use the Pixel Crushers Common > Save Game To Slot and Load Game From Slot actions. These will save the data to storage. (The Dialogue System > Save Game and Load Game actions, on the other hand, only save and load strings, which you can store on your own.)

Re: Playmaker save/load

Posted: Thu May 13, 2021 10:53 am
by pewldo
Hi

That did it:)

Thank you for your time!

Re: Playmaker save/load

Posted: Thu May 13, 2021 1:05 pm
by Tony Li
Glad to help!