• 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.

[Trigger] Item being cloned on drop instead of removed

Status
Not open for further replies.

GrapesOfWath

Sound Reviewer
Level 18
Joined
Mar 31, 2012
Messages
281
So I have an item that, when picked up by a ranged unit that has Bash, transforms into a different version of the item, and then if that unit drops it, it changes back into the original version. The transformation when the item is picked up works fine, but it's hella buggy for when the item gets dropped.
kjQh53j.png

Instead of replacing the item at its dropped location as intended, it spawns 2 of the item in the center of the map. What am I doing wrong here? I feel like there's some kind of easy solution and I'm just stupid or something but I dunno.
 
Last edited:
Level 12
Joined
Jul 4, 2016
Messages
634
Add a wait, its probably not detecting the position since it will be regarded as still being inside the inventory when the event fires.
 
Level 13
Joined
May 10, 2009
Messages
868
The event "Unit loses an item" fires a bit before actually dropping an item. The reason why it is running twice is because of the "Item - Remove (Item being manipulated)" action. Event run order:
- 1st run: Unit is about to drop it.
- 2nd run: Item is being removed by the 1st run while it is still present in the unit's inventory, which forces the event to be triggered again.

To solve that problem, you'll have to use a timer or put a simple wait on top of all actions. By doing this, the item positioning problem will be solved too - when an item is being carried by a unit, its position is still where it was last picked up.
 
Last edited:
Status
Not open for further replies.
Top