• 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] Need Custom Item Drop Trigger

Status
Not open for further replies.
Level 9
Joined
Aug 15, 2007
Messages
261
How can I make a unit drop 10 of the same items (When they are killed), one for each player?
Can the Items be directly dropped into the inventory of the hero?

There are 10 players and I want one to drop per player
well can some one help plsssssssssss
:infl_thumbs_up:
 
Level 6
Joined
Feb 2, 2005
Messages
205
  • Example
    • Events
      • Unit - A Unit Dies
    • Conditions
      • (Unit-type of (Triggering Unit)) Equal to CreepXY
    • Actions
      • Custom script: local location udg_tmppoint
      • Set PNum = Calculate somhow the players stuff
      • Item - Create PNum Potions at tmppoint
      • Custom script: call RemoveLocation(udg_tmppoint)
You can give an item directly to the Heros, but they need an free inventory Slot or it will drop in front of them. I cant think of an easy, to get the playing players as a number.

If you want a random Drop you will need an Item-Type Array
  • Example
    • Events
      • Map Ini
    • Actions
      • Set Drop[1]=Healpotion
      • Set Drop[2]=Manapotion
      • Set Drop[3]=Some Item
      • Set Drop[4]=Another Item
      • ..... and so on
replace this
  • Item - Create PNum Potions at tmppoint
  • with this
  • Item - Create PNum Drop[Random Number between 1, 4] at tmppoint
Those Trigger might be different from the ones in the WE, i just guessed em out of thin air.
 
Status
Not open for further replies.
Top