How do I create a 3 itens slot

0 favourites
  • 2 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I want to create a platform game with a 3 itens slots on the interface. These 3 slots allows the player can carrying a total of only 3 itens. Thus, if the player is already carrying a total of 3 itens, he needs to discard a item and then take that he wants (the discard could be by an automatic way - i.e: the discard is made from right to left. So, when the 3 slots are filled, the item that will be discarded is that one that occupies the first slot from the left).

    The itens will distributed along the level design and an item discarded will be stay where it was left. When a item is collected, an icon representing it is added on the slot.

    Each slot have a hotkey, which must pressed to "use" that item.

    The idea is use the right item in the right place to progress in the game (a mix of adventure and platform game). I am searching for information that could help me to figure out how I can create this item system, but I can't find anything.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There a re a couple of ways to do it. One uses an array so go read the array tutorial and the inventory tutorial on C2.

    The simpler way is to use a place holder inside your inventory frame sprite for each of the 3 items.

    When the player clicks on an item have it set position to the place holder.

    Use a global variable for the number of items and when it reaches 4 just destroy the first item in the inventory and slide all the other items over to the next place holder.

    Here is a game I created that uses a place holder not an array for controlling inventory: ... ellar-1989

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