• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Item System

Status
Not open for further replies.
Level 6
Joined
Jun 24, 2011
Messages
202
I need a system that I can edit to use with custom units. It has to determine the type of item a hero it trying to get and see if it already has that item type in its inventory. If so it displays a message and drops the item.

Ex:
Unit aquires Item ??? and that same unit has ??? in its inventory.
A Message says: You already have that item
Item is dropped.
 
Level 7
Joined
May 18, 2010
Messages
264
ill test it out later. thanks

  • ad
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Item = (Position of (Item being manipulated))
        • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Item-type of (Item being manipulated)) Equal to (==) (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A)))
              • Then - Actions
                • Unit - Order (Hero manipulating item) to drop (Item being manipulated) at Item
              • Else - Actions
Not shure if the Set Item (works) u may need to do 2 triggers for this one ^^
 
Level 13
Joined
Oct 25, 2009
Messages
995
  • ad
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Item = (Position of (Item being manipulated))
        • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Item-type of (Item being manipulated)) Equal to (==) (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A)))
              • Then - Actions
                • Unit - Order (Hero manipulating item) to drop (Item being manipulated) at Item
              • Else - Actions
Not shure if the Set Item (works) u may need to do 2 triggers for this one ^^

You didn't remove the leaks...
  • Custom script - call RemoveLocation(udg_Item)
 
Status
Not open for further replies.
Top