Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I am trying to be able to access global variable score in my "Level 1" layout in "Highscore" layout.I think i wrongly use local storage or there might be issues with the logic.
How do i fix it ?
Demo here--> dropbox.com/s/gz2apzcdn70fwgv/workingdemolatest-improved%20-%20Copy.capx
Thanks in advance
Develop games in your browser. Powerful, performant & highly capable.
Could you explain your project or the use of your variable more detailed?
I'm afraid I can't download the capx since I'm in a location with very bad and slow internet connection atm.
Text is all I can up- or download...
Local storage is for loading data when you close the game down and reopen it. The issue here is because you have an event in level1 that on start of layout sets score to 0. Every time you include level1 it will reset score to 0 on the start of every layout. Because score is set to 0 by default this event is not needed, remove that and then it works.
Thanks plinkie....That fixed it