playMaker

Author Topic: Save and load int (easy save 2)[SOLVED]  (Read 1690 times)

nowISnow

  • Playmaker Newbie
  • *
  • Posts: 7
Save and load int (easy save 2)[SOLVED]
« 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.
« Last Edit: August 09, 2017, 03:51:58 AM by jeanfabre »

Ateam

  • Full Member
  • ***
  • Posts: 116
Re: Save and load int (easy save 2)
« Reply #1 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

nowISnow

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Save and load int (easy save 2)
« Reply #2 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?

elusiven

  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
Re: Save and load int (easy save 2)
« Reply #3 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.

nowISnow

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Save and load int (easy save 2)
« Reply #4 on: August 08, 2017, 06:08:13 AM »
got it, thanks.