How do I swap items in Inventory?

0 favourites
  • 4 posts
From the Asset Store
Full game Construct 2 capx code source to post on Google Play
  • Hello

    I create inventory system, but at this moment i got problem with item swap, exactly, the point is that when an item is dropped from the enemy (e.g. a sword) and I would like to replace it with the weapon currently held in my hand i cant and the object overlaps the object. I try to fix that from 2 days and i got bad results :P

    Any idea how to replace items between inventory and equipped ?

  • First move the one in the slot back into the inventory then pick the new one and equip it. Use a variable on items to determine which is the new one to equip for picking in events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So first i need to create new condition, if item is in inventory (boolen - new_item set True) next item overlapping itemholder_weapon go to invslot, and item overlapping invslot with this VAT go to itemholder_weapon? Idk if i good understand :)

  • If you're saying the item is in inventory already when you go to equip it then ok there is no need for a variable. To equip it you already have logic for this to click on the item. First you must remove the equipped item so for that you can pick the one which is in the slot and move it out.

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