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

[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: 39
Status
Not open for further replies.
Top