How do I make an in game shop?

0 favourites
  • 5 posts
From the Asset Store
Easy to use shop and inventroy populated by an array!
  • Hello there i'm kinda new with construct 2, but i think i can handle the basics.

    Currently i'm just building and creating stuff to learn more how this engine works.

    I tried to search tutorial or instructions for this problem quite long, and came out with pretty much nothing.

    What is the easiest way to create in game shop?

    I tried to do simple simple one with few different sprites that are invisible in HUD layer. And when player is on collision with merchant the sprites will change to visible. Problems are that:

    1) Its possible to press the invisible button.

    2) If i have many different screens/buttons in the HUD layer it becomes really messy if i have everything in there.

    The point is not to go to another layout, but that the shop window appears in the current one.

    Thank you already

  • for the 1st issue:

    you can add variables to your buttons that tells if the button is enabled, then you add the condition "if button.enabled = True" to the event "on button clicked"

    you can switch the value of this variable when you want to disable the button.

    2nd issue:

    simply create several layers: HUD1 HUD2... or window1, window2...

  • Thank you yapiiiii

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay i got myself bit confused.

    I created global variable that defines if the group where i did put the "shop sprites" works or not.

    But what if there is two selections in that shop [YES] and [NO]. If i select [NO] it closes the shop window until i trigger the merchant again. But if i press [YES] i don't want the whole shop thing to pop up again if i'm in collision with merchant again.

    (I hope thats not too confusing)

    I would appreciate if there is picture about this tutorial or instruction

  • sorry for the huge delay

    If you haven't solved your problem yet :

    Simply add another variable (merchant, for instance) to enable or disable the merchant : if the shop is already open, then disable the merchant (merchant = 0). When you close the shop, re-enable the merchant (merchant = 1). That's all

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