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

Item Help - Item Class Drop

Not open for further replies.
Level 3
Dec 7, 2007

I have Searched the forum and i found NONE threads like this or i just dint search enough, who cares lets get to the point

How can i make a system which only allows a unit to carry one item class of each kind, so it can only carry 1 Artifact and 1 Permanent? only one type of class item in the inventory, so if it allready carrys a item of class: Artifact, and tries to pick up a new, the system will make the item being picked up to drop and displays a message.

Can Any Help?:wthumbsup: i neeed it!
Level 6
Feb 2, 2005
Basicly it would look like this.

  • Tricky Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Artifact
    • Actions
      • For each (Integer A) 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 carried by (Hero manipulating item) in slot (Integer A))) Equal to Artifact
              • (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
            • Then - Actions
              • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You can carry only ...
              • Hero - Drop (Item being manipulated) from (Hero manipulating item)
            • Else - Actions
Not open for further replies.