Problem with item recipe.

Level 1
Joined
Feb 7, 2015
Messages
1
Hi, I'm having trouble with an item recipe. What's confusing me is it is an exact clone of one that works.

The trigger which correctly removes exactly one Sword 1 and replaces it with Sword 2 even if the hero has multiple Sword 1s:

  • Sword2a
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Sword 2 (Recipe)
    • 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 Sword 1
            • Then - Actions
              • Item - Remove (Item being manipulated)
              • Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
              • Hero - Create Sword 2 and give it to (Hero manipulating item)
            • Else - Actions
Then this trigger for some reason if you have multiple Sword 2s will remove them all and replace them all with Sword 3.


  • Sword3a
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Sword 3 (Recipe)
    • 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 Sword 2
            • Then - Actions
              • Item - Remove (Item being manipulated)
              • Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
              • Hero - Create Sword 3 and give it to (Hero manipulating item)
            • Else - Actions
They're near identical apart from the items being bought/replaced. Does anyone have any ideas?
 
Top