playMaker

Author Topic: player prefs stage open Problem  (Read 2170 times)

qaaz345

  • Playmaker Newbie
  • *
  • Posts: 39
player prefs stage open Problem
« on: September 28, 2013, 05:08:19 AM »
Hi!

When you clear a stage in one scene, by assign the 10 variables in [a], it is saved in the global variable to [a1].
Make sure that the allocation of 10 to [a1] is go back to the scene to pick stage then, it will be saved in the variable [a2]
Check the a2, when save more 10 or create a text the save! .
 
In the other stages, by substituting 10 for b, in the stores to global variable b2,
In the screen for selecting stage, saved by the comparison in the same way by checking the global variable again! I have to output the text.
 
You are trying to create an event to solve the stage locked in that way
 
Saved it has has become the repository of all the three When you clear only boiling stage 1.
 
Meaning of the word, When you clear only stage 1, stage all that would open ...
 
Global variable (global variable) is, do I would share with everyone the name is also different?


scene2
                   int add                       p.prefs Get Int                 
clear! →  Globals/stage open    →     Key None                     →
                 add +10                       var Globals/stage open 
---------------------------------------------------------------------------------------------
   p.prefs Set Int                                       Load Level     
   Key Globals/save box                →       scene1(start scene)           
   var Globals/stage open 
---------------------------------------------------------------------------------------------
scene3
                   int add                       p.prefs Get Int                 
clear! →  Globals/stage open2    →     Key None                     →
                 add +10                       var Globals/stage open2 
---------------------------------------------------------------------------------------------
   p.prefs Set Int                                       Load Level     
   Key Globals/save box2                →       scene1(start scene)           
   var Globals/stage open2 
----------------------------------------------------------------------------------------------
scene1

p.prefs Get Int                    p.prefs Set Int                                                                              Key Globals/save box     →   Key Globals/save box  →           
var stage save                    var stage save     
---------------------------------------------------------------------------------------------
int compare                   Set GUI Text
stage save  >= 10   →    save!     


and

p.prefs Get Int                    p.prefs Set Int                                                                             Key Globals/save box2     →   Key Globals/save box2  →           
var stage save2                    var stage save2     
---------------------------------------------------------------------------------------------
int compare                   Set GUI Text
stage save2  >= 10   →    save2!   

I Wanted

scene2           scene1     

claer!!     →   Text1 [save!]
                   Text2 [------]

scene3           scene1     

claer!!     →   Text1 [------]
                   Text2 [save2]

But the reality

scene2           scene1     

claer!!     →   Text1 [save!]
                   Text2 [save2!]


scene3           scene1     

claer!!     →   Text1 [save!]
                   Text2 [save2!]


...ㅠㅠ Help me!




               
« Last Edit: September 28, 2013, 05:16:24 AM by 문도현 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: player prefs stage open Problem
« Reply #1 on: September 30, 2013, 02:21:16 AM »
Hi,

 it's a little unclear :) but let's try to solve this.

 I am sure it's because you do not reference properly your pref keys.

Can you look in the prefs file themselves? and make sure that the value is there or not. This is the first thing to do here.

bye,

 Jean