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

When a unit with inventory (no hero) dies, it drops the items it's carrying

Level 23
Joined
Dec 24, 2019
Messages
400
Hi everyone again, another small problem has arisen that I don't think is difficult to solve but I can't find the option I'm looking for. What I need is simple, make it so that when a unit with inventory (no hero) of a type dies, it drops the items it is carrying. I know how to do it with heroes but it doesn't work for normal units with inventory as it is in this case.
 
Level 18
Joined
Mar 16, 2008
Messages
721
if it's a non-hero, the default behavior is for that non-hero unit to drop all its items on death.

are you using the correct non-hero inventory ability on the non-hero units?

if you are referring to heroes then this is what you want:
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • Item - Make (Last created item) Drop from Heroes upon death
 
Level 23
Joined
Dec 24, 2019
Messages
400
if it's a non-hero, the default behavior is for that non-hero unit to drop all its items on death.

are you using the correct non-hero inventory ability on the non-hero units?

if you are referring to heroes then this is what you want:
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • Item - Make (Last created item) Drop from Heroes upon death
I mean normal units, but they don't drop the items when they die by default, that's why I ask because with heroes I know how to do it as you said but I can't find a way to do it for normal units. And if they should do it by default, well in my case they don't do it for some reason.
You can customize the Inventory ability to your liking. You can create as many of these abilities as you want with each having their own unique settings.

Drop Items On Death is the field you're looking for.
But that option I only find a way to make it work with heroes, could you give me an example for normal units?

Thank you.

PS: They have in True the can drop item on death

PS 2: It works with standard units but not with custom ones and I don't know why.

Ok, I just fixed it, it's because I use a custom inventory ability, if I use the standard inventory abilities if they drop the items. Thank you very much, sorry for the inconvenience.
 
Last edited:
Level 23
Joined
Dec 24, 2019
Messages
400
go to the unit's Ability list in Object Editor. What ability are they using?
The problem was that I created two custom inventories to normal units, but the inventory I copied was the inventory (hero), not the inventory (unit). That's why it didn't work, I created the custom inventories again based on the inventories (unit) and everything works correctly. A clumsiness on my part.

Sometimes I drown in a glass of water :ogre_hurrhurr:
 
Top