0
Answered

drag ammo outside inventory

Syed Suhaib Zubair 6 months ago in Inventory updated 5 months ago 4

i have an ammo box and i want to drop some bullets from my ammo box. how to use drag out of inventory option in inventory UI to subtract some of bullets from ammo box and drop on the scene for others to collect. i am able to drop the prefab of ammo box but  how to subtract ammos from ammo box prefab.

Unity version:
2019
Game Creator version:
1.6

Good question! I'm also interested in how to share several identical objects!

can you explain? Do you want to drop an ammo box on the floor, and then remove like 4 bullets leaving them on the floor and putting the ammo box back into your inventory? So then another player could then pick up those 4 bullets.

yes something like that. I want to select from inventory that i want to drop like 30 bullets out of 60 which are i picked up from an ammo box prefab. now i want to drop 30 bullets so that anyone can pick up. may be its me again.

and one more issue which is suddenly generate on drag drop an item out of inventory ui. can you resolve or tell me what is the issue exactly.


Answered

Seems that you should use a Container for this. Containers allow you to keep a bunch of item. You can create a prefab and add a Container object and have a few bullets inside there, for others to collect.

Regarding the issue, please, make sure to open different tickets for different questions. You posted this twice on another thread, which I already answered: https://support.gamecreator.io/communities/1/topics/148-inventory-drag-item-is-causing-error