• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Inventory

Status
Not open for further replies.
Level 12
Joined
Mar 13, 2012
Messages
1,121
DotA currently has quite every item at least fourfold. The ones you see in the shops are units, the ones added to a unit when an item is bought or picked up are tomes so they can be picked up even when the inventory is full. Triggers react to the pick up of those tomes and create the real items accordingly. Lastly there are the disabled versions of the items ofc.
 
Level 9
Joined
Dec 15, 2009
Messages
523
If you play DotA or Bleach vs One piece you see what im talking about

I see,how about try placing player units nearby the shop,
units with inventory(hero) ability
i suggest use circle of power then add inventory to them

EDIT: although your player cant buy items when the hero is nearby tho...''inventory is full'' will still come out lol just test it..
my bad
 
Last edited:
Level 15
Joined
Aug 7, 2013
Messages
1,337
can anyone show some example of trigger?

Ezekiel12 has explained it nicely for you.

Ezekiel12 said:
DotA currently has quite every item at least fourfold. The ones you see in the shops are units, the ones added to a unit when an item is bought or picked up are tomes so they can be picked up even when the inventory is full. Triggers react to the pick up of those tomes and create the real items accordingly. Lastly there are the disabled versions of the items ofc.

What does this mean? You will need to have four different objects for each 'item'

1. A dummy unit at the shop which players purchase (mercenary camp style I believe?). The unit should have the portrait of the item it represents.

2. A dummy tome that is created when the dummy unit is trained. The tome is moved to the hero's inventory immediately upon creation. A trigger then detects which tome was consumed/used and then creates the real item in the hero's inventory.

3. Finally, the real item. This is added after consuming a corresponding tome.

4. In the case that the hero's inventory is full, the item created would just spawn at the feet of the hero. However, if you have a backpack system, you could detect this and just put the item there. Likewise if you are using item pages (put the item at an open slot in a non-filled page).

So besides 3x objects for each item (dummy unit, dummy tome, real item), you'll need several triggers. Detect when a dummy unit is trained, detect when a dummy tome is consumed, and detect when inventory is already full to put the extra item somewhere.
 
Status
Not open for further replies.
Top