Simple Character Unlock Query

0 favourites
  • 3 posts
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • Hi, So we have a platformer game which have 8 different character .So when user get 10 diamonds, character 2 will be unlocked. So how we unlock character 2?

    So we had added a compare logic for each character when diamond global variable greater or equal too 10 diamonds, then only 2nd character will be clickable and so on.

    So our issue is we have added diamond in almost every stages(not spawned) when user play 1 stage repeatedly he will get all the diamond on stage 1 only. so here where the problem occurs.

    Any simple way to minimize this loop hole ??

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You'll need a way to keep track of which diamonds have been collected. You can do this by using an array.

    When a player collects a diamond, check the array to see if the diamond has been collected before. If it hasn't, award the diamond and update the array.

    The entire array can be saved to local storage and loaded upon starting the game again

  • You can make the diamonds disapper if user plays a map again. So player only gets diamond once in the same map. -I can help you through Discord (Craera#3644)-. To do that

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