How to make units/creeps/bosses drop items?

Accname

2D-Graphics enthusiast
Reaction score
1,464
there are several ways.
one possibility would be to give them a custom inventory ability which has the data "can use items" equal to false and the data "drop items upon death" equal to true. then just give the items you want to preplaced units or create them via triggers.
only problem, this way you cannot drop more then 6 different items for each creep.

solution no2
create items at the position of the creeps after they got killed by a player.
problem: many if/then/elses...

there might be plenty more, just think about what you like most.
 

Jun

New Member
Reaction score
1
>Accname :Can you please give me the triggers? lol I'm noob at triggers...
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
for solution 1:
are your units preplaced or created ingame via triggers? if they are preplaced there is no need of any triggers. if they are created with a trigger just do:
Trigger:
  • Hero - Create Super Mega Imba Item of Pwnage and give it to (Last created unit)

after spawning them.

for solution 2:
thats a simple trigger like this:
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Murloc-Facility Manager
        • Then - Actions
          • Set TempPoint = (Position of (Triggering unit))
          • Item - Create Precious Ring Of The Murloc Dude at TempPoint
          • Custom script: call RemoveLocation (udg_TempPoint)
        • Else - Actions

TempPoint is a point variable needed to remove memory leaks.

this trigger would create 1 item of type "Precious Ring Of The Murloc Dude" at the position of a "Murloc-Facility Manager" which is owned by neutral hostile upon its death.

there might be better solutions it all depends on your map.
 

Jun

New Member
Reaction score
1
Rofled at Super Mega Imba Item of Pwnage, btw ill try it, arigatou. :D

If it doesnt work, i'll let you know.
 

gjcraig

New Member
Reaction score
2
Rofled at Super Mega Imba Item of Pwnage, btw ill try it, arigatou. :D

If it doesnt work, i'll let you know.

You can just double click on the creep or whatever in the World editor and it will let you assign stuff there.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top