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

How do I make items drop from dead creeps?

Status
Not open for further replies.
Level 18
Joined
Mar 13, 2009
Messages
1,411
You want them to drop not when they die, but some seconds later? If they would just have to drop on death you could double click a creep in your map and set the items there. If creeps are created with triggers you might want to trigger item drops.
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
If creeps are trained/summoned or created with triggers, you must trigger drop.

Here is drop trigger:
  • Drops
    • Events
      • Unit - A unit Dies
    • Conditions
      • -------- Add conditions here --------
    • Actions
      • Set RandomInteger = (Random integer number between 1 and X)
      • -------- This integer adds drop chance --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomInteger Equal to 1
        • Then - Actions
          • Set RandomInteger = (Random integer number between 1 and X)
          • -------- This integer is used to drop different items --------
          • Set TempPoint = (Position of (Triggering unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomInteger Equal to 1
            • Then - Actions
              • Item - Create <Item 1> at TempPoint
              • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomInteger Equal to 2
            • Then - Actions
              • Item - Create <Item 2> at TempPoint
              • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomInteger Equal to 3
            • Then - Actions
              • Item - Create <Item 3> at TempPoint
              • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
              • -------- And so on... --------
        • Else - Actions
 
Status
Not open for further replies.
Top