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

Item Help - Item Class Drop

Status
Not open for further replies.
Level 3
Joined
Dec 7, 2007
Messages
19
Yo!

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
Joined
Feb 2, 2005
Messages
205
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
 
Status
Not open for further replies.
Top