• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,054
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