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

How to make pickup and drop all items?

Status
Not open for further replies.
Level 7
Joined
Mar 22, 2010
Messages
214
How to make pickup and drop all items?
It's similar to DotA in the Circle of power where we put items to be build.
Pick up all items
> Picks up all of your items (not your allies items)
Drop all items
> Drops all your items


Thanks again,
.mitsuki
 
This belongs to the World Editor Help Zone, but anyway.
  • Trigger
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Pick up items
    • (Unit-type of (Triggering unit)) Equal to Circle of Power
  • Actions
    • Set Point[1] = (Position of (Triggering unit))
    • Item - Pick every item in (Playable Map Area) and do (Actions)
      • Loop - Actions
        • Set Point[2] = (Position of (Picked item))
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Distance between Point[1] and Point[2]) Less than or Equal to 2500.00 //Real comparison
            • (Owner of (Picked item)) Equal to (Owner of (Triggering unit)) //Player comparison
          • Then - Actions
            • Hero - Create (Item-type of (Picked item)) and give it to (Triggering unit)
            • Item - Remove (Picked item)
          • Else - Actions
        • Custom script: call RemoveLocation (udg_Point[2])
    • Custom script: call ReemoveLocation (udg_Point[1])
  • Drop Items
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability bieng cast) Equal to Drop items
    • (Unit-type of (Triggering unit)) Equal to Circle of Power
  • Actions
    • For each (IntegerA) from 1 to 6, do (Actions)
      • Loop - Actions
        • Hero - Drop (Item carried by (Triggering unit) in slot (IntegerA)) from (Triggering unit)
 
Status
Not open for further replies.
Top