• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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