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

Drop item of same type

Status
Not open for further replies.

Wky

Wky

Level 1
Joined
Dec 6, 2016
Messages
2
How to drop a item of san type. Exp: if i get a Claws of attack (+12), the next item that i pick is Claws of attack (+12) drops it, or just cant pick it.
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
You need to compare the item-type of items in the unit's slots 1-6 to the item-type of the item that's just been picked up. If the item types match and they're different actual items (item comparison) (otherwise you'd automatically drop the item you pick up every time even if no duplicate) then drop the item from the unit's inventory. There were a few threads about this recently, search a bit and you will find some example triggers.
 
Status
Not open for further replies.
Top