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

[Trigger] Inventory System Drop Check

Status
Not open for further replies.
Level 4
Joined
Jan 21, 2009
Messages
57
So I'm trying to figure out how to make this trigger work, 20 different tests with different functions and it still wont work properly, this is the closest I have gotten.

  • Item System TEST
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Hero manipulating item)) Equal to Man
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-class of (Item being manipulated)) Equal to Permanent
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • weapon_true[(Player number of (Owner of (Hero manipulating item)))] Equal to True
                • Then - Actions
                  • Hero - Drop (Item being manipulated) from (Hero manipulating item)
                  • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: You already have a ...
                • Else - Actions
                  • Unit - Order (Hero manipulating item) to move (Item being manipulated) to inventory slot 1
                  • Item - Make (Item being manipulated) Undroppable
                  • Set weapon_true[(Player number of (Owner of (Hero manipulating item)))] = True
            • Else - Actions
        • Else - Actions

  • Set weapon_true[(Player number of (Owner of (Hero manipulating item)))] = False

Anyone know what I may be doing wrong?

When I pick up the item (Sword (Permanent Class)) which is set to inventory slot 1, It will ALWAYS drop the item, saying I have a weapon in my inventory already, even though the variable boolean is set to false, any idea on how to fix this?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If you want to setup each item belong to what Item Class, simply refer from Object Editor;
Stats - Classification

In that test map, I classified them as these orders;
Permanent - Boots
Power Up - Weapon
Artifact - Helm
 

Attachments

  • Simple Item Class Check System.w3x
    15 KB · Views: 40
Status
Not open for further replies.
Top