• 🏆 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 slot checking condition. Help!

Status
Not open for further replies.
Level 8
Joined
Jun 26, 2010
Messages
530
That?

  • Untitled Trigger 009
    • Events
    • Conditions
      • (Item carried by (YourUnit) in slot 1) Equal to No item
    • Actions
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Like you need to have six different specific items to trigger an action?

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set items[0] = Claws of Attack +15
      • Set items[1] = Crown of Kings +5
      • Set items[2] = Kelen's Dagger of Escape
      • Set items[3] = Mask of Death
      • Set items[4] = Orb of Frost
      • Set items[5] = Ring of Protection +5
  • Untitled Trigger 020
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) has an item of type items[0]) Equal to True
      • ((Triggering unit) has an item of type items[1]) Equal to True
      • ((Triggering unit) has an item of type items[2]) Equal to True
      • ((Triggering unit) has an item of type items[3]) Equal to True
      • ((Triggering unit) has an item of type items[4]) Equal to True
      • ((Triggering unit) has an item of type items[5]) Equal to True
    • Actions
      • Unit - Kill (Triggering unit)
 
Level 8
Joined
Jun 26, 2010
Messages
530
Like you need to have six different specific items to trigger an action?

I think he meant just for the unit to have all the 6 inventory slots used no matter what item they've got.

  • Untitled Trigger 009
  • Events
  • Conditions
    • (Item carried by (YourUnit) in slot 1) Not Equal to No item
    • (Item carried by (YourUnit) in slot 2) Not Equal to No item
    • (Item carried by (YourUnit) in slot 3) Not Equal to No item
    • (Item carried by (YourUnit) in slot 4) Not Equal to No item
    • (Item carried by (YourUnit) in slot 5) Not Equal to No item
    • (Item carried by (YourUnit) in slot 6) Not Equal to No item
  • Actions
Also, with this trigger, swaping "not equal" and "equal" and using "Multiple Conditions - Or" you can detect if a player have at least one free slot.
 
Level 8
Joined
Jun 26, 2010
Messages
530
Dammit, only now i realized that my user msg could pass a wrong message. I tried to use the "..." to say something like "No giving me rep is ok, but at least thank me". I think i will change it haha.
I'm glad i could help, and thank you for warning me abaout that haha
 
Well here you can use my Item Drop System for that!
Just use loop action, you will find it!
IDS - Infinite Number of Item Classes

  • Item System
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 1
        • Then - Actions
          • Set Item = 0
          • For each (Integer Item_Slot) from 1 to 6, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item level of (Item carried by (Hero manipulating item) in slot (Item_Slot))) Equal to 1
                • Then - Actions
                  • Set Item = (Item + 1)
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Item Greater than 1
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Hero manipulating item)
              • Game - Display to (All players) the text: You can carry only one level 1 item!
            • Else - Actions
        • Else - Actions
If you are 2 lazy to check it! You can give test item to hero and check slot number with it!
There are 2 many ways to create that, I always use something like this :razz:
 
Status
Not open for further replies.
Top