• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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?
 
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
 
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.
Back
Top