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

About Unit picked dropped item automatically

Status
Not open for further replies.
Level 6
Joined
Mar 9, 2009
Messages
175
About Unit picked dropped item automatically

Hey guys , can you guys teach me how to do a trigger which makes unit automatically pick dropped item on near by distance ?

E.G :
Peasant Dies then drop a tome , a footman which near by about 300 distance will auto pick up the tome .


Guys pls help me
 
Level 7
Joined
Mar 5, 2009
Messages
254
Ok your trigger should look like this :
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Peasant
    • Actions
      • Item - Create Tome of Experience at (Position of (Triggering unit))
      • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Dying unit)) matching ((Unit-type of (Matching unit)) Equal to Footman)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Right-Click (Last created item)
Note : Don't forget to clear the leaks.
 
Status
Not open for further replies.
Top