Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: naktim0819 on April 07, 2013, 09:11:46 PM

Title: Why when Reset Level,level state does not return to the starting value?[SOLVED]
Post by: naktim0819 on April 07, 2013, 09:11:46 PM
Why when Reset Level ,my level state does not return to the starting value?
I ever try use "Restart Level", " Load level Num", "Load Level"
my level state velue not return to the game first value?

I also need to do something?

How should I do!?

Please and Thanks for ur help!
Title: Re: Why when Reset Level ,my level state does not return to the starting value?
Post by: naktim0819 on April 09, 2013, 02:30:22 PM
http://hutonggames.com/playmakerforum/index.php?topic=1014.msg14654#msg14654
my question are the same this question
but i saw the question at list not get the answer

Looks reset incomplete
I have some object 's  animation  are keeps play  before I reset

I record my game's video the middle button is reset
hope can get anwser

I have try to see m2h sample
it's just level num
why it can clear ?
Title: Re: Why when Reset Level ,my level state does not return to the starting value?
Post by: naktim0819 on April 09, 2013, 11:31:54 PM
I make a little project the right up is the reset button
it's also can't reset


I also Attach my test unitypackage ing this reply
Title: Re: Why when Reset Level ,my level state does not return to the starting value?
Post by: Alex Chouls on April 12, 2013, 01:39:29 PM
Are you using global variables? Or DontDestroyOnLoad?
Title: Re: Why when Reset Level ,my level state does not return to the starting value?
Post by: naktim0819 on April 13, 2013, 03:42:03 AM
I didn't use DontDestroyOnLoad?

But I have some value use global variables

So I can't use globe value?
but I hava Some value is  in This Scene I need to send between
object

but not on another Scene

I need to use what variables type?
I can sent between 2 or 3 object it can use .
not on other scene  and not use globe value



                                    Thank u
Title: Re: Why when Reset Level ,my level state does not return to the starting value?
Post by: Alex Chouls on April 13, 2013, 09:35:23 AM
You can use global variables, but their values are not reset on level load. If they need to reset, you should set their values manually after loading the level.
Title: Re: Why when Reset Level ,my level state does not return to the starting value?
Post by: naktim0819 on April 13, 2013, 10:19:53 AM
ok!
Thanks! Alex
so I need to set the value =0 on scene began! right!

thanks u!

If I want to save some score Ranking  every time
Open the game It still on save   not will be clear I want to use what Value

Title: Re: Why when Reset Level ,my level state does not return to the starting value?
Post by: Alex Chouls on April 13, 2013, 11:57:18 AM
If you want to save a variable between sessions, take a look at the PlayerPref actions.