• 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.

[Trigger] Any way to discover if an item fails to be sold?

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2008
Messages
263
A hero wants to shop an item.

The hero already have 6 items.

The hero fails to shop the item.

Can I trigger an event when the item is clicked / when it fails to be sold?


This is done in DotA
 
Level 6
Joined
Apr 23, 2008
Messages
263
Soz. My bad :p

The way that I did it, create a duplicate of the item, base off of a tome... then just check whenever an item is used. IE: if the item is a special duplicate, then check the unit's inventory, if there's space, then create the "real-deal" item. :thumbs_up:

will take time but I will try that thanks
 
Level 6
Joined
Sep 5, 2007
Messages
264
Good to hear. I had a bit of a play with it a while back...
I created two arrays for my items, one for the "duplicate" and one for the "real thing". Doing it this way also allows you to make the "sold" item cost nothing to buy, but do your own check for prices.
Then, you can have you own style of tooltip for the prices (instead of the tiny icons).

EG:
Mythril Arrows
Cost: 400 gold, 50 lumber
.........

It took me a bit to get it to work exactly how I wanted, but it does look good when you're done. :thumbs_up:
 
Status
Not open for further replies.
Top