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

Status
Not open for further replies.
Level 6
Joined
Mar 2, 2013
Messages
127
I need help fixing a problem that i tried to fix many ways but just doesn't work.
Since I'm using the same recipe item for 2 different items, it gives me an extra item.
The problem is in the Second Multiple functionsIf.
I need to add like another condition or change something, any ideas?
Thanks in advance.

Extra info
In both trigger Chakra Armor has same name, but its different.
Chakra Armor(shop) is a tome.

  • Scroll of Chakra Armor 1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • 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 (==) Scroll of Chakra Armor(Shop)
          • ((Triggering unit) has an item of type Vitality Booster) Equal to (==) True
          • ((Triggering unit) has an item of type ANBU Platings) Equal to (==) True
          • (Number of items carried by (Triggering unit)) Equal to (==) 6
          • ((Triggering unit) is A Hero) Equal to (==) True
        • Then - Actions
          • Item - Remove (Item carried by (Hero manipulating item) of type Vitality Booster)
          • Item - Remove (Item carried by (Hero manipulating item) of type ANBU Platings)
          • Hero - Create Chakra Armor and give it to (Hero manipulating item)
        • Else - 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 (==) Scroll of Chakra Armor(Shop)
              • ((Triggering unit) is A Hero) Equal to (==) True
            • Then - Actions
              • Hero - Create Scroll of Chakra Armor and give it to (Hero manipulating item)
            • Else - Actions
              • Set ItemCombine = (Position of (Triggering unit))
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Item-type of (Item being manipulated)) Equal to (==) Scroll of Chakra Armor(Shop)
                    • ((Triggering unit) has an item of type Vitality Booster) Equal to (==) True
                    • ((Triggering unit) has an item of type ANBU Platings) Equal to (==) True
                    • (Number of items carried by (Triggering unit)) Equal to (==) 6
                  • Then - Actions
                    • Item - Remove (Item carried by (Triggering unit) of type Vitality Booster)
                    • Item - Remove (Item carried by (Triggering unit) of type ANBU Platings)
                    • Item - Create Chakra Armor at ItemCombine
                    • Set LastItem = (Last created item)
                    • Wait 0.35 seconds
                    • Unit - Order (Triggering unit) to Right-Click LastItem
                  • Else - 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 (==) Scroll of Chakra Armor(Shop)
                      • Then - Actions
                        • Item - Create Scroll of Chakra Armor at ItemCombine
                        • Set LastItem = (Last created item)
                        • Wait 0.35 seconds
                        • Unit - Order (Triggering unit) to Right-Click LastItem
                      • Else - Actions
  • Scroll of Chakra Armor 2
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • 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 (==) Scroll of Chakra Armor(Shop)
          • ((Triggering unit) has an item of type Energy Booster) Equal to (==) True
          • ((Triggering unit) has an item of type ANBU Platings) Equal to (==) True
          • (Number of items carried by (Triggering unit)) Equal to (==) 6
          • ((Triggering unit) is A Hero) Equal to (==) True
        • Then - Actions
          • Item - Remove (Item carried by (Hero manipulating item) of type Energy Booster)
          • Item - Remove (Item carried by (Hero manipulating item) of type ANBU Platings)
          • Hero - Create Chakra Armor and give it to (Hero manipulating item)
        • Else - 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 (==) Scroll of Chakra Armor(Shop)
              • ((Triggering unit) is A Hero) Equal to (==) True
            • Then - Actions
              • Hero - Create Scroll of Chakra Armor and give it to (Hero manipulating item)
            • Else - Actions
              • Set ItemCombine = (Position of (Triggering unit))
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Item-type of (Item being manipulated)) Equal to (==) Scroll of Chakra Armor(Shop)
                    • ((Triggering unit) has an item of type Energy Booster) Equal to (==) True
                    • ((Triggering unit) has an item of type ANBU Platings) Equal to (==) True
                    • (Number of items carried by (Triggering unit)) Equal to (==) 6
                  • Then - Actions
                    • Item - Remove (Item carried by (Triggering unit) of type Energy Booster)
                    • Item - Remove (Item carried by (Triggering unit) of type ANBU Platings)
                    • Item - Create Chakra Armor at ItemCombine
                    • Set LastItem = (Last created item)
                    • Wait 0.35 seconds
                    • Unit - Order (Triggering unit) to Right-Click LastItem
                  • Else - 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 (==) Scroll of Chakra Armor(Shop)
                      • Then - Actions
                        • Item - Create Scroll of Chakra Armor at ItemCombine
                        • Set LastItem = (Last created item)
                        • Wait 0.35 seconds
                        • Unit - Order (Triggering unit) to Right-Click LastItem
                      • Else - Actions
 
Level 6
Joined
Mar 2, 2013
Messages
127
That won't solve anything, because I put it in the multiple function if, so it skips the actions when it creates the item. The problem is that I have 2 triggers and a part the of trigger is the same due to the items I am trying to make in these two triggers require the same recipe scroll. So it will go through both triggers since they have the same recipe scroll. Pretend I have the items needed to make the item below.

  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Item-type of (Item being manipulated)) Equal to (==) Scroll of Chakra Armor(Shop)
  • ((Triggering unit) has an item of type Vitality Booster) Equal to (==) True
  • ((Triggering unit) has an item of type ANBU Platings) Equal to (==) True
  • (Number of items carried by (Triggering unit)) Equal to (==) 6
  • ((Triggering unit) is A Hero) Equal to (==) True
  • Then - Actions
  • Item - Remove (Item carried by (Hero manipulating item) of type Vitality Booster)
  • Item - Remove (Item carried by (Hero manipulating item) of type ANBU Platings)
  • Hero - Create Chakra Armor and give it to (Hero manipulating item)
So now I have Chakra Armor Item. For the other trigger it will check that I don't have the items needed to make it, so it skips that part and it will just go to the next part of the trigger.

  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Item-type of (Item being manipulated)) Equal to (==) Scroll of Chakra Armor(Shop)
  • ((Triggering unit) is A Hero) Equal to (==) True
  • Then - Actions
  • Hero - Create Scroll of Chakra Armor and give it to (Hero manipulating item)
  • Else - Actions
Then it will create the scroll aswell. So I've have The actual item and a scroll of the item.
 
Status
Not open for further replies.
Top