playMaker

Author Topic: Save current level with player prefs  (Read 2071 times)

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Save current level with player prefs
« on: August 22, 2015, 11:11:13 PM »
I've seen some topics, but they all seem to confusing. I'm using easy save with playmaker. And wanted to know how do we set it up to where the current level is an int... And load it when they load the game again..

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Save current level with player prefs
« Reply #1 on: August 23, 2015, 07:52:00 AM »
Hi,
do you mean to load where you where in a scene?
if so, it depends on your project

you can't save (yet) in what state the fsm's are so you need to safe the data you need, to continue you scene.


for example :
you want to have your player @ the same position he left the scene, then you need to safe his position (vector 2 / vector 3 ) then @ the start of you scene you need to load this on set your player on that position.

you can also use check points using a int to save/load

Usually you will load your data @ the start of the scene. and save whenever something needs to be saved.

there is also a system event "Aplication Quit" that you can use to save stuff when game is quit

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Save current level with player prefs
« Reply #2 on: August 23, 2015, 03:49:36 PM »
You first manually set your level in an int by scene. So, lets say we are in scene 4 (level 4) I will place in an empty game object an FSM with int 4.

Using easy save I will set that int 4 with the action Save Int. Then when the game starts it will open up scene 0 and scene 0 will load int and grab the current int 4 and you can set the load level to int 4

If you want to save positions and so on, just follow djaydino.

Also, here is a tutorial talking about Easy Save 2
It uses it with arraymaker but it discusses tags, save files, etc and I may be biased but everyone should use arraymaker anyways :P
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez