How do I create a Main Menu using different images for each button?

0 favourites
  • 7 posts
From the Asset Store
This music pack covers differents situations for visual novels, anime games and many more!
  • Hello to all the Construct-ors... out there, after what feels like a trillion years, I am finally almost done with my project, but I am running into an issue that I am not quite sure how to solve. I apologize if this has been answered, but I swear I have read through the tutorials so many times in the past 3 weeks, that I feel like I have memorized them. I wouldn't ask, but I'm totally stuck...

    The game I am making is geared toward pre-school and kindergarten children. The game consists of 3 different types of levels, with a total of 144 levels. I have found how to code the menu/level buttons, select the unlocked level when the menu/level button is clicked, save stars from each level, and unlock the next level based off of the number of stars from the previous level. My problem is this: I want my menu/level buttons to reflect the type of level the child will be playing, so they do not get lost or confused about what the level is. (Similar to Candy Crush, or Bubble Witch Saga 3).

    Levels: 1,4,7,10,13,16,19...etc will use a specific image(ex.memory match level)

    Levels: 2,5,8,11,14,17,20...etc will use a specific image(ex.connect the dots)

    Levels: 3,6,9,12,15,18,21...etc will use a specific image(ex.item drop)

    When the levels are locked I'd like a small lock in the bottom of the button sprite, and when unlocked I need that lock removed, and when stars are earned I would like to have them show up (1star, 2star, 3star, 4star, 5star)on top of the same image that was used to begin with (relating to each level).

    The issue that I am not sure how to get around is... how do I show multiple different images as my menu/level buttons, instead of the same image used for all menu/level buttons?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is every button visible in the editor view before the game starts? I know some may be locked but is every button available, so many instances of 'button' on screen? If so then you can just set it up in the editor to show a certain animation. If not, let me know how you are creating the level buttons and I can tell you some other ways.

  • Thank you so much for your fast reply! I am setting it up as if the child were reading a book, by chapters. Each chapter is a letter group, (AB, CD, EF, etc)

    So, it will essentially look like:

    (MM= memory match, CtD=connect the dots, ID=item drop -- for reference to the letters on the blocks):

    Each page will have a new chapter, and there are 12 levels per chapter (each level differs, which is why there are so many). So group AB and CD will be seen first, then when they are ready to move on they click on the "next page" arrow and see EF and GH, and so on.

  • Ok and the pages are different layouts? If the images as depicted there are preset in the layout you can set the animation of individual objects in their properties, is that good enough for the game?

  • My apologies, I am a bit confused. From what I gather, when creating multiple level buttons to be unlocked, you need to use one sprite with an instance variable that can be changed per the level it belongs to. When level is unlocked, set animation frame to (#) and when stars are gained set animation to (#). If this is the case, how do I use different images if the code calls a specific image each time this is accomplished?

    The way I have it set up is similar to construct.net/en/tutorials/level-select-174 but I am unsure of how to add different images to be called at the win of each individual level(with its own image on the button) and still have everything look right, and not all the same image. I hope this makes sense, it is early so my brain isn't fully functioning yet. Let me know if you need me to clarify please.

  • Ok thanks for the info. If you've done it this way then it should be easy to sort out. Based on array/level status you set a frame, so if its complete or not complete, and a number of stars, but this is only setting frames of an animation.

    For levels that you know are of type A, you set the animation to type A. Type B the animation you set to type B etc. You make sure that each animation has the frames represent the same level state i.e. 0 locked 1 unlocked 2 1 star etc, the only thing that will be different is each animation is using different background image based on level type.

    So all you need to do is set the animation in editor view. The frames of the animation will be controlled by the tutorial logic. Just make sure the animations are matching with frames aside from the game type background images.

  • Thank you for your info! I will play around with this and see if I can get it right. I am a visual learner, so it might take me some time, but I will let you know how it goes.. eventually :)

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