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

Demo for Turning Dropped Item to Dummy

Status
Not open for further replies.
Level 7
Joined
Nov 4, 2006
Messages
153
Hey all. I need help with this thing I've been having trouble with for quite some time. If someone out there who knows how to do this would like to create of demo of how, I would greatly appreciate it.

What I want is a feature of DotA's.
A hero can buy an item from a shop (able to even if inventory is full) - I assume it is a dummy item which gets used up when acquired.

Then the bought item either drops at the hero's position if his inventory is full or is given to the hero if the inventory has space. - I also assume the dropped item is a dummy; the one given to the hero isn't.

The dropped item can be right-clicked to be picked up and if the inventory is full, the item remains at the spot. If the inventory has space, the real item is given to the hero.

Thanks.
 
Level 15
Joined
Jan 25, 2008
Messages
450
What you need to do is to create a dummy item based on any runic item, eg Tome of experience, rune of healing etc, and give it no abilities. Make sure the 'perishable' and 'use when acquired' boxes are ticked in the dummy item's options, then set the tooltips and icon the same as the actual item they recieve.

Then you make a trigger with the following information:

Event:
-A unit sells an item

Conditions:
-(Item-type of (Sold item)) equal to (*Your Item(Runic)*)

Actions:
-Hero - Create *Your Item(Non-runic)* and give it to (Buying unit)

This makes it that the buyer buy the runic item, and receive the non-runic item instead. I have a map for you with an example of how you'd make it, showing both the triggered way and normal way. Hope this halps, it's really quite an easy and useful concept, especially for item stacking and quests.
Enjoy! :thumbs_up:
 

Attachments

  • Runic item example.w3x
    16.9 KB · Views: 31
Level 7
Joined
Nov 4, 2006
Messages
153
Thanks tee.dubs, but there's more I need if you can help.

"The dropped item can be right-clicked to be picked up and if the inventory is full, the item remains at the spot. If the inventory has space, the real item is given to the hero."
So I need help with, if the hero's slots are full, the runic item is created at the hero's feet. (actually I did this already)
And if the non-runic item is dropped by the hero, it changes into the runic one so that heroes even with full inventories can try to pick it up (useful for recipe items). If the hero attempting to pick it up already has a full inventory, it should create the runic form back at the original spot.
 
Status
Not open for further replies.
Top