playMaker

Author Topic: System Event  (Read 1724 times)

nabilfx

  • Full Member
  • ***
  • Posts: 186
System Event
« on: June 08, 2015, 10:44:06 AM »
Can i create a system event?
Im using a Load Level, to call the Level 2, but them after 2 second im going back to Load Level to call Level 1 but into another FSM, cause I need to save another Float var the score, I would like to now if this is possible, or forget about it?
« Last Edit: June 08, 2015, 11:09:39 AM by nabilfx »

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: System Event
« Reply #1 on: June 08, 2015, 11:59:37 AM »
I'm not super sure if it's what you're asking but try using Don't Destroy On Load on whatever you need to carry across scenes.
Or keep the score as a Global Variable.

nabilfx

  • Full Member
  • ***
  • Posts: 186
Re: System Event
« Reply #2 on: June 08, 2015, 12:05:49 PM »
The problem is that I need to save the score in another var when i go back to Level 1, i dont now how to shif to another var in the same scene, when i came back from level 2

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: System Event
« Reply #3 on: June 09, 2015, 01:36:35 AM »
Hi,

Terri is right either your GameObject is set to not destroy on load and therefore will survive ANY level loading, or save in a global.

 You also have the option to save/load in/from PlayerPrefs. this has he great advantage to persists even when the user will close the app.

Bye,

 Jean