• 🏆 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 a hero equip only 1 kind of item

Status
Not open for further replies.
Level 25
Joined
May 11, 2007
Messages
4,651
This should probably work. Use the item categories for different types of items, like:
Helmets - Artifacts
Hands - Purchasable
Weapons - Permanent
Chest - Charged
Potions, Etc - Misc
  • Events
    • Unit - A unit Acquires an item
  • Conditions
    • ((Triggering unit) is A Hero) Equal to True
  • Actions
    • For each (Integer tempInt) from 1 to 6, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Item-class of (Item being manipulated)) Equal to (Item-class of (Item carried by (Triggering unit) in slot tempInt))
          • Then - Actions
            • Game - Display to (All players) the text: You cannot have two...
            • Hero - Drop (Item being manipulated) from (Triggering unit)
          • Else - Actions
 
Status
Not open for further replies.
Top