How do I keep counting coins through the layouts?

0 favourites
  • 3 posts
From the Asset Store
112 High-Quality Coins and Chest SFX specially crafted for video games
  • Hi there!

    I'm trying to find a way to continue the counting of coins(apples in my case) when you start a new level, instead of start from 0 again.

    That's crazy becouse for me makes no sense, but I couldn't find any tutorial or manual about.

    For now I have a Global Number for collecting coins (wich is restarting to 0 every level), and a Global time wich I can't get the time from, at the ending layout.

    Thank you so much!

    PD: The current GlobalAPPLES(coins) is 20 Because, since I couldn't fix it, I decide to change it to count down from the total apples of the layout.

  • I'm not sure what you've done but a global variable should keep its value between levels by default.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Has to be a mistake or misclick somewhere in your game logic. Posting some screen shots of your events or uploading the single file project .capx would let us take a further look at it. A global variable should be persistent as long as your project is open. My guess is you are counting apples that you attached to a local variable named the same thing possibly on the player object when you were originally working out how you would count apples but I don't know for sure until I am able to look closer at the events.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)