• 🏆 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!

[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: 281
  • Pic2.jpg
    Pic2.jpg
    354.3 KB · Views: 285
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 33
Joined
Mar 27, 2008
Messages
8,035
So basically Tavern select your unit, but it doesn't sell/offer any items to be bought, therefore your Inventory List does not appear

If you go to the Goblin Merchant, it sells/offers items to you, that's why it shows your current Inventory

This is the summary, lol
 
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