Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nabilfx on June 08, 2015, 10:44:06 AM

Title: System Event
Post by: nabilfx 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?
Title: Re: System Event
Post by: terri 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.
Title: Re: System Event
Post by: nabilfx 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
Title: Re: System Event
Post by: jeanfabre 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