Hi everyone. I'm facing a problem here and will try my best to describe it as clear as possible (not english native).
My game have 2 layouts:
Layout 1 - The board
Layout 2 - Sprite creator selection screen
On Layout 1 i have a button that sends me to layout 2 where have some buttons for character selection. When I select a character a global variable is set to true (along with other variables) and I get back to layout 1. When layout 1 loads it check the variable and if its true it creates the objects and pin them, this is working fine.
The problem is that when I repeat the process to create another sprite the previous ones created ones have their pins breaked. Its not a problem with Persist, both the sprites are created correctly but the previous one looses its PIN behaviour, only the new one get its PIN.
As test purpose I made 2 buttons on layout 1 with the same function as above and it works pretty well. So the problem probably on the Layout chage. I have more than 50 sprite creator and really want them to have theyr own layout.
Anyone have a solution or an idea to test? Thanks
Edit: CAPX HERE
I have no idea why the pin is not recalled by the persist behaviour.
Some one brighter than me will probably find the cause or mark it as a bug.
In the mean time, if you need a workaround, here is one, by 'assisting' the persist. Just 'mimic' what it supposed to do:
https://www.dropbox.com/s/2g6q5digc7wky ... .capx?dl=0
Thanks a lot —
That worked =D
Develop games in your browser. Powerful, performant & highly capable.
99Instances2Go still got a problem with this behavior.
I add a button to go to Layout 3 and on Layout 3 i have a back to layout 1 button. When it goes back it looses the behavior as well. I add your code to "layout 1 -> on load" but it still looses the behavior. Do you have any idea to persist?
CAPX with back buttons
You dont secure the state before going to layout 3, as you do before going to layout 2.
Just do the same. Button clicked ... backup ... change layout.
Thanks, i missed that.
Getting a 404 on that link - Any chance someone can fill me in?