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

[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