I have been trying to fix some major issues with within my game. Tried following tutorials, examples, helpful posts...still can not figure this out. Starting to get frustrated and feel a little stupid.
You roll a ball over disks that have stars on them.
When you collide with the stars you get points.
When you score enough stars, certain achievements trigger and you gain a certain number of shield power-ups (100 stars = 1 shield. 200 stars = 2 shields etc. etc.) and a shield should spawn at the exact moment.
If you die with a shield equipped, another shield should spawn when the ball is created, if there are more shields available, but it doesn't.
With the help of plinkie i was able to get the shield to spawn when the achievement triggers. But now when you die, if you have a number of shields, the shield count would go to a negative number or go to zero.
My problem, and where i know i am getting confused and feel so stupid, is synchronizing the localstorage with the Global Variable's, and ultimately with the logic that goes with it.
Some info on the capx - I have the achievement triggers set low for the stars, this is only so that it's faster to test. Also, on the Menu event sheet there is an action to 'clear storage'. I enable this, run the menu layout and then before i test i go back and disable that 'clear storage' action so the localstorage will save. Then I run the Menu layout again. Just makes things a bit easier, for now and at least for me.
If anyone could take a look, and help a numb-skull out with this frustrating problem, it would be greatly appreciated.