playMaker

Author Topic: persistent scenes  (Read 1835 times)

ivam

  • Playmaker Newbie
  • *
  • Posts: 34
persistent scenes
« on: April 26, 2015, 04:03:51 PM »
Hello,

iam making a small project involving one scene as a base, with the different adventure levels being each in a seperate scene. I would like functionality where the player can go from the base to another scene, play and collect (gold for example) and return to the base scene at any time, but also being able to return to the adventure level he has been at, keeping it in the state as when he left it. - so things that have been collected remain gone, and things that have been added to the base stay the way they are eventho the player travels between scenes (with load level)

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: persistent scenes
« Reply #1 on: April 27, 2015, 06:40:27 AM »
Check out the concept of "singletons"- I think there's an action for it around here somewhere and the "don't destroy on load" action- you can also use playerprefs to set var's and when the scene loads check them and turn things on and off based on those-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

ivam

  • Playmaker Newbie
  • *
  • Posts: 34
Re: persistent scenes
« Reply #2 on: April 27, 2015, 02:10:08 PM »
cool, thank you, allready thought ill have to work with var tests, hoped there would be an easy way to get scenes persistent without having to query every object that can be picked up.

« Last Edit: April 27, 2015, 02:14:10 PM by ivam »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: persistent scenes
« Reply #3 on: April 28, 2015, 04:03:24 AM »
Hi,

 yeah, and I just pushed yesterday a custom action SingletonManager on the Ecosystem where it will automatically delete duplicates of your singletons

This is typically on complex projects with many scenes, they all need the manager to work on their own, but when playing from the start, then loading scenes will create duplicates, this action will solve this.

Bye,

 Jean