• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Displaying Unit Inventory

Status
Not open for further replies.
Level 15
Joined
Jul 6, 2009
Messages
889
Is there a way to enable a unit's inventory to be shown when interacting with a merchant building that doesn't sell items?

When a unit interacts with a building that sells only units, their inventory is not shown. When a unit interacts with a building that sells items, their inventory is shown. What I'm after is to make it so that the interacting unit's inventory is displayed when it interacts with buildings with units only.

In the below image, the Blademaster's inventory is hidden when it interacts with the Tavern.
attachment.php


However, in this image, you can see the Blademaster's inventory.
attachment.php


My initial plan was to add a "dummy item" that couldn't be bought as it was always out of stock. The "dummy item" had a black icon so players wouldn't notice the dummy item (despite an empty tooltip coming up when mouse-overed). The problem with this is that the in-stock quantity is still displayed with the item's icon and it takes up one command card slot.
 

Attachments

  • Pic1.jpg
    Pic1.jpg
    369.1 KB · Views: 291
  • Pic2.jpg
    Pic2.jpg
    354.3 KB · Views: 295
Level 15
Joined
Jul 6, 2009
Messages
889
The unit has "Shop Purchase Item" and "Select Hero" abilities. From what I've tested, the display of inventory is controlled by whether the unit can sell items or not. I've enabled the item to sell units and the inventory is displayed. Remove the item and it's gone. Thank you for your replies anyways, they are much appreciated :)
 
Level 15
Joined
Jul 6, 2009
Messages
889
Oh well, my goal was to allow players to purchase items with a full inventory by creating the item on the unit sold event. To circumvent the problem of the inventory not being displayed, I just made the items automatically be used upon acquiring (like powerups), so problem solved!
 
Status
Not open for further replies.
Top