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