Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nowISnow on August 07, 2017, 05:09:30 PM

Title: Save and load int (easy save 2)[SOLVED]
Post by: nowISnow on August 07, 2017, 05:09:30 PM
I tried to figure out how to save and load a simple int using easy save 2 (or player prefs). I dont know what I do wrong.

What I need:

Scene 1:
Two buttons.
If button 1 is pressed, it stores "0" in int variable named skin.
If button 2 is pressed, it stores "1" in int variable named skin.

Scene 2:
Load int variable and make an int switch based on "skin" and decide, which skin to show.

For some reasons, I cant get it to work.

When I use "save int" action, it wants me to use a str variable for the tag? Isnt the tag the name of the variable (=key)?

I didnt found any usefull documentation.
Title: Re: Save and load int (easy save 2)
Post by: Ateam on August 07, 2017, 07:13:28 PM
the tag is how the easysave localize your int inside the txt file, when you need load the int, you need put the same tag
Title: Re: Save and load int (easy save 2)
Post by: nowISnow on August 08, 2017, 04:31:32 AM
so is "tag" the name of the int variable I can use or do I have to convert it somehow?
Title: Re: Save and load int (easy save 2)
Post by: elusiven on August 08, 2017, 05:43:15 AM
Tag is the reference name of the variable you are saving in ES2 file. If it's dynamic then it could be your object's name, it's up to you how you want to name it.
Title: Re: Save and load int (easy save 2)
Post by: nowISnow on August 08, 2017, 06:08:13 AM
got it, thanks.