• 🏆 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 an item be carried by only one hero?

Status
Not open for further replies.
Level 10
Joined
Dec 11, 2009
Messages
234
Here is general idea:
  • Events
    • Unit - A unit Acquires an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to Maul of Strength
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Hero manipulating item)) Not equal to Uther
      • Then - Actions
        • Hero - Drop (Item being manipulated) from (Hero manipulating item).
      • Else - Actions
Don't forget to clean up the leaks, of course.

But don't do this:
  • Unit - Order (Hero manipulating item) to drop (Item being manipulated) at (Position of (Hero manipulating item))
(it won't work, because the unit may be stunned or something, and you can easily spam "S" to cancel the order)
 
Level 11
Joined
May 9, 2021
Messages
189
Here is general idea:
  • Events
    • Unit - A unit Acquires an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to Maul of Strength
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Hero manipulating item)) Not equal to Uther
      • Then - Actions
        • Hero - Drop (Item being manipulated) from (Hero manipulating item).
      • Else - Actions
Don't forget to clean up the leaks, of course.

But don't do this:
  • Unit - Order (Hero manipulating item) to drop (Item being manipulated) at (Position of (Hero manipulating item))
(it won't work, because the unit may be stunned or something, and you can easily spam "S" to cancel the order)
Thanks for the help :)
 
Status
Not open for further replies.
Top