how do I build a star based score?

0 favourites
  • 6 posts
From the Asset Store
Hand-animated Sprite Base for isometric game/animation development
  • Hey guys,

    I am building a game with 10 levels and for every level I want to be able to get 3 stars based on the score. Is there a good tutorial online or method to do this for a beginner?

    Thanks

  • For a beginner the best way might be to make a global variable for each level and set it to 1,2 or 3 depending on the star score for that level.

  • I was thinking the same thing but then in the level selection menu I ran into some problems...

    I use a sprite with 4 frames for the stars, frame 0 is no stars, frame 1 is one star, and the same with frame 2 and 3, and then I made 9 instances of that object but now I have to figure out how I can get my score per level to save the correct frame of that sprite

    I have a level_score variable that checkes if the score beats the level highscore and than 10 highscore_level variables for each level but now I am trying to figure out how I can get my highscore variable to be saved to the instance of that level

  • Set an instance variable on the level select sprites and number them in order. Then you say something like f object.var=1 set frame to global variable 1. If object.var=2 set frame to global variable 2. This matches the frame, and in a way the level, to the star score variables.

  • Made this real quick with C2 but you can open it in C3.

    https://www.mediafire.com/file/qaawh13ng0jkyfc/StarSystem.capx/file

    You can play with the visibility of the star so that you need a single frame in the Star Sprite.

    Like Plinkie said the key is to have an instance variable for the Stars from 1 to 3 so they know when they need to become visible or not :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys,

    I appreciate the help but it still doesn't work. It is probably some mistake in my event sheet or something so I will find it out.

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