• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Item Auto Destroy

Status
Not open for further replies.
Level 11
Joined
Jun 20, 2009
Messages
880
So i need this kind of system:

If Item is dropped, it will be automatically destroyed after 7 seconds if not picked.

Here's what i've done so far:

  • Murgul Scout Drop
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Mur'gul Scout
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Item - Create Skull Shield at TempLoc
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Add a 7.00 second Generic expiration timer to (Last created unit)
      • Hashtable - Save Handle Of(Triggering unit) as 0 of (Key (Last created unit)) in Hash
      • Hashtable - Save Handle Of(Last created item) as 1 of (Key (Last created unit)) in Hash
      • Custom script: call RemoveLocation(udg_TempLoc)
  • Destroy Items
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy
    • Actions
      • Set LoadUnit = (Load 0 of (Key (Triggering unit)) in Hash)
      • Set LoadItem = (Load 1 of (Key (Triggering unit)) in Hash)
      • Set TempLoc = (Position of LoadItem)
      • Item - Remove LoadItem
      • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Hash
      • Custom script: call RemoveLocation(udg_TempLoc)
My triggers has one problem. If you pick the item, it will still be destroyed after 7 seconds :p
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

When the destroying part comes, what will happen if you add this condition before it should be destroyed:
  • ((Last created item) is owned) Equal to False
A tip ( but I thing you know it ) "(Center of (Playable map area)" is a leak and you have to destroy the special effect, else this is a leak too ;)

Greetings and Peace
Dr. Boom
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Test map attached
Try kill those nasty Footmen =D
And get all the items
After you get 3 blades of attacks, drop the 3 items on the ground before the Destory Item trigger starts
Then, watch the result =D
Yeah, it's DESTORY !
 

Attachments

  • Remove Excess Items.w3x
    12.9 KB · Views: 46
Status
Not open for further replies.
Top