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

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
192
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