0 Favourites

How do I make an in-game shop?

  • So,I'm working on this small Shoot-'em-Up and want to make an in-game store,where you use your score to purchase new items like bombs and missiles.

    I want to make it so that you can,while playing,press a key,like 5,and lose 1500 points but get your new item immediately.

    However,I can't seem to find a way to 'unlock' the item,It only works when the Player gets the item right at the beggining of the level.Anyone know how to do in-level(?) shops?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hey - Sounds like you've done some legwork with getting the shop set up but are having issues unlocking items (based on experience?) as well as updating what items the player has currently.

    I'd recommend using Local Storage and an Array for unlocking items (what's available in the store).

    I may be complicating things a bit, but I'd also have a separate array for items the player currently has, which should be updated/loaded with local storage as well.

    Here are some tutorials:

  • For each item in the shop set frame 0 to a locked item symbol and add an instance variable.

    Each level completed add 1 to a global variable (I'll call it "level" for this comment).

    On start of layout item.variable is less than level » set frame to 1

    On item clicked if frame is not 0 » give the item to player.

    To check if frame is not 0, just use compare frame then toggle invert.

  • Ball shopping example :

    [ excuse non-english content ]

  • could you reapload "Ball shopping example" because link is dead ;/

  • rs2322 here it is >>

    You can summon me by include alextro in your post.

  • So,I'm working on this small Shoot-'em-Up and want to make an in-game store,where you use your score to purchase new items like bombs and missiles.

    I want to make it so that you can,while playing,press a key,like 5,and lose 1500 points but get your new item immediately.

    However,I can't seem to find a way to 'unlock' the item,It only works when the Player gets the item right at the beggining of the level.Anyone know how to do in-level(?) shops?

    A shop like in this game

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