• 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 Drop system problem... need help

Status
Not open for further replies.
Level 2
Joined
Feb 24, 2008
Messages
17
Uhmmm im trying to get an item drop system up and working... But im trying and trying.. And nothing is happening... Heres what I am trying thus far:
  • Forest Stalkers
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • Itemdrop1to10[1] Equal to 1
          • (Unit-type of (Triggering unit)) Equal to Forest Stalker
          • (Owner of (Dying unit)) Equal to Player 12 (Brown)
    • Actions
      • Set Itemdrop1to10[1] = (Random integer number between 15 and 25)
      • Item - Create Troll Axe at (Position of (Dying unit))
I want it to drop more then just a troll axe I also want like.. Idk maybe like small amount of gold or somthing like that any suggestions???

Oh and before I forget I have a abilities book im trying to make... It hasn't gone so well this far :hohum: I deleted my last trigger to try and get a abilities book up.. If someone could get me a suggestion I would deeply appreciate it?
 
Level 6
Joined
Sep 4, 2007
Messages
157
ok heres a item drop trigger i use
  • unitdies
    • Events
      • Unit - A unit owned by Player 10 (Light Blue) Dies
      • Unit - A unit owned by Player 11 (Dark Green) Dies
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
    • Actions
      • Set player_kills[(Player number of (Owner of (Killing unit)))] = (player_kills[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 20
        • Then - Actions
          • Item - Create Items[(Random integer number between 1 and 23)] at (Position of (Dying unit))
        • Else - Actions
      • Wait 25.00 seconds
      • Unit - Remove (Dying unit) from the game
that is the trigger that has the item droped you can take out the random integer part if you want every unit to drop an item but you can make another trigger to holds the item variable in it
 
Level 2
Joined
Feb 24, 2008
Messages
17
ok heres a item drop trigger i use
  • unitdies
    • Events
      • Unit - A unit owned by Player 10 (Light Blue) Dies
      • Unit - A unit owned by Player 11 (Dark Green) Dies
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
    • Actions
      • Set player_kills[(Player number of (Owner of (Killing unit)))] = (player_kills[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 20
        • Then - Actions
          • Item - Create Items[(Random integer number between 1 and 23)] at (Position of (Dying unit))
        • Else - Actions
      • Wait 25.00 seconds
      • Unit - Remove (Dying unit) from the game
that is the trigger that has the item droped you can take out the random integer part if you want every unit to drop an item but you can make another trigger to holds the item variable in it

I don't want random items droping.. I want Speific item's that I have made for the unit to drop... This wont help there with random level..:sad:
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Set your creeps to a arrayed unit variable
  • Example
  • Set Unit[1] = Pig
  • Set Unit[2] = Boar
  • Set Unit[3] = Wolf ---- ERROR ! wolves are too pwnt to die !

Now set all your items according to the units
  • Example
  • Set Item[1] = Pig Leg
  • Set Item[2] = Boar Teeth
  • Set Item[3] = Wolf ---- ERROR ! wolves are too pwnt to drop items

Now create a loop that checks what unit it is and throws a item according to that.
  • Example
  • For each (Integer A) from 1 to 3, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Unit[(Integer A)]
        • Then - Actions
          • Set Point = (Position of (Triggering unit))
          • Item - Create Item[(Integer A)] at Point
          • Custom script: call RemoveLocation(udg_Point)
        • Else - Actions

I added the point and then removed it to remove the Point leak you had there.
If you do not know what leaks are or how to solve them, look here.
 
Status
Not open for further replies.
Top