• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Determine if item Purchased or Pickup

Status
Not open for further replies.
Level 5
Joined
Mar 22, 2009
Messages
172
Currently using EVENT_PLAYER_UNIT_PICKUP_ITEM, and I need to do something different based on whether an item is purchased or picked up. I don't think I can using the "Item purchased" event, due to massive existing complexity in existing map.

Any suggestions on how to differentiate?
 
Level 17
Joined
Mar 21, 2011
Messages
1,611
you could pick every item in a periodic timer trigger that is lying on the ground and change its custom value to 1, now if you create a trigger with a "item purchased" event, you can check if the custom value is 1, if its not, you purchased it.
maybe its not the best solution, but i couldnt think of anything else and at least it should work
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Currently using EVENT_PLAYER_UNIT_PICKUP_ITEM, and I need to do something different based on whether an item is purchased or picked up. I don't think I can using the "Item purchased" event, due to massive existing complexity in existing map.

Any suggestions on how to differentiate?

why would you think anything else could be faster than +1 if in existing/new trigger with item puchased event?
 
Status
Not open for further replies.
Top