• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

The easiest way to collect identical items

Level 4
Joined
Apr 16, 2025
Messages
56
I swear to God, I recently saw a very basic trigger for collecting identical items in one map. It looked something like this:

  • Crown
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Circlet of Nobility
          • (Item-type of (Item being manipulated)) Equal to Circlet of Nobility
          • (Item-type of (Item being manipulated)) Equal to Circlet of Nobility
    • Actions
      • Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
      • Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
      • Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
      • Hero - Create Crown of Kings +5 and give it to (Triggering unit)
(in this version 3 crowns are collected)

But in that version, one crown was assembled. Everything worked, I tested it. I was also very surprised that it worked, and I thought that in reforge the editor became much more functional. However, I lost this method! Please tell me how to make such a trigger?P.S. I'm currently using a much more complex system of this kind:

  • Crown2 2 2
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) has an item of type Circlet of Nobility) Equal to True
      • ((Triggering unit) has an item of type Circlet of Nobility) Equal to True
      • ((Triggering unit) has an item of type Circlet of Nobility) Equal to True
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Circlet of Nobility
            • Then - Actions
              • For each (Integer B) from ((Integer A) + 1) to 6, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to Circlet of Nobility
                    • Then - Actions
                      • For each (Integer C) from ((Integer B) + 1) to 6, do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Item-type of (Item carried by (Hero manipulating item) in slot C)) Equal to Circlet of Nobility
                            • Then - Actions
                              • Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
                              • Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
                              • Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
                              • Hero - Create Crown of Kings +5 and give it to (Triggering unit)
                              • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                              • Do nothing
                    • Else - Actions
                      • Do nothing
            • Else - Actions
              • Do nothing
 
Last edited:
Level 13
Joined
Nov 13, 2010
Messages
285
this is what i came up with
  • item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) has an item of type Circlet of Nobility) Equal to True
    • Actions
      • Set VariableSet Integer_Circlets = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Circlet of Nobility
            • Then - Actions
              • Set VariableSet Integer_Circlets = (Integer_Circlets + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Circlets Equal to 3
        • Then - Actions
          • Set VariableSet Integer_Circlets = 0
          • For each (Integer B) from 1 to 6, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Item carried by (Triggering unit) in slot (Integer B))) Equal to Circlet of Nobility
                • Then - Actions
                  • Item - Remove (Item carried by (Triggering unit) in slot (Integer B))
                  • Set VariableSet Integer_Circlets = (Integer_Circlets + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer_Circlets Equal to 3
                    • Then - Actions
                      • Hero - Create Crown of Kings +5 and give it to (Triggering unit)
                      • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
        • Else - Actions
 
Level 4
Joined
Apr 16, 2025
Messages
56
this is what i came up with
  • item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) has an item of type Circlet of Nobility) Equal to True
    • Actions
      • Set VariableSet Integer_Circlets = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Circlet of Nobility
            • Then - Actions
              • Set VariableSet Integer_Circlets = (Integer_Circlets + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Circlets Equal to 3
        • Then - Actions
          • Set VariableSet Integer_Circlets = 0
          • For each (Integer B) from 1 to 6, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Item carried by (Triggering unit) in slot (Integer B))) Equal to Circlet of Nobility
                • Then - Actions
                  • Item - Remove (Item carried by (Triggering unit) in slot (Integer B))
                  • Set VariableSet Integer_Circlets = (Integer_Circlets + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer_Circlets Equal to 3
                    • Then - Actions
                      • Hero - Create Crown of Kings +5 and give it to (Triggering unit)
                      • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
        • Else - Actions
Not bad, one step smaller, it seems, although the volume is almost the same.
 
Top