playMaker

Author Topic: How to save and load position?  (Read 1529 times)

adre

  • Playmaker Newbie
  • *
  • Posts: 20
    • View Profile
How to save and load position?
« on: July 14, 2017, 12:04:31 PM »
Hello,
I have been using the script here:

, to save and load my player position. It worked well. Until i added a new scene into my project. The script doesn't support multiple scenes.

Currently i have a 3D menu scene, and a 3D game scene. I am planning to make several more game scenes (levels). And the position of the player in the game scenes should be saved and loaded. Definitely not the position of the menu scene.

I looked around a lot on youtube and playmaker forum but unable to find a solution.

Any ideas?
Thanks in advance.

Ateam

  • Full Member
  • ***
  • Posts: 114
    • View Profile
Re: How to save and load position?
« Reply #1 on: July 14, 2017, 12:34:32 PM »

adre

  • Playmaker Newbie
  • *
  • Posts: 20
    • View Profile
Re: How to save and load position?
« Reply #2 on: July 14, 2017, 01:11:28 PM »

I watched that already. It doesn't involve saving and loading of position.

If the video & actions in it provides you the needed things to be able to do that, i do not know how to do it as i am a complete beginner..
« Last Edit: July 14, 2017, 01:16:41 PM by adre »

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 731
    • View Profile
Re: How to save and load position?
« Reply #3 on: July 14, 2017, 08:11:58 PM »
Easy save is a very popular third party asset for true saving/ loading function. It has playmaker actions and can save variables: https://www.assetstore.unity3d.com/en/#!/content/768

Also, I personally have used one called Smooth save, which is half the price, with similar functions (but only works for playmaker and not unity in general): https://www.assetstore.unity3d.com/en/#!/content/43134

Lastly, there is a "don't destroy on load" action for playmaker, which can keep a gameobject (and its FSM) alive between scenes. Its a not true save/load, but can keep data alive for the duration of the game.


adre

  • Playmaker Newbie
  • *
  • Posts: 20
    • View Profile
Re: How to save and load position?
« Reply #4 on: July 15, 2017, 04:29:29 AM »
Any free alternatives or a way to do in Playmaker?

If i wanted to save lots of gameobjects for a true game,yes, i would buy one of those save assets. Yet, even if i buy, i checked EasySave website and didnt find a way to save and load position. I cannot figure out myself how to.

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 731
    • View Profile
Re: How to save and load position?
« Reply #5 on: July 15, 2017, 05:15:50 AM »
I believe you can use unitys playerprefs, although I am less familiar with this way myself.
There is a tutorial video here:
Jean also made an example that is posted in this thread: http://hutonggames.com/playmakerforum/index.php?topic=2596.0

To save a position, you must first get the position into a vector 3 variable. You can use the action "get position", to get that vector3. Then the various save assets can save your variables.

Easy save has some instructions here: http://docs.moodkie.com/easy-save-2/guides/playmaker-saving-and-loading/
« Last Edit: July 15, 2017, 05:18:58 AM by tcmeric »

adre

  • Playmaker Newbie
  • *
  • Posts: 20
    • View Profile
Re: How to save and load position?
« Reply #6 on: July 15, 2017, 06:51:25 AM »

To save a position, you must first get the position into a vector 3 variable. You can use the action "get position", to get that vector3. Then the various save assets can save your variables.



So after i use "get position" and then easy save to save  , i just load the saved variable with easy save and thats all?