• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

[Trigger] I'm doing something wrong, but i can't find it..

Status
Not open for further replies.
Level 6
Joined
Nov 28, 2007
Messages
203
something's wrong here, but i just dunno what -.- i've checked it over and over again for wrong stuff. i've noticed more and more wrong conditions/actions, but i can't see what's wrong anymore..

this trigger's made for setting the items into variables that i use in the second trigger:
  • Events
    • Map initialization
  • Conditions
  • Actions
    • Set ItemType[1] = Claws of Attack +3
    • Set ItemType[2] = Claws of Attack +6
    • Set ItemType[3] = Claws of Attack +9
    • Set ItemType[4] = Claws of Attack +12
    • Set ItemType[5] = Claws of Attack +15
the second trigger's made for upgrading ex. 3 Claws of Attack +3 into 1 Claws of Attack +6
  • Add item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to ItemType[1]
          • (Item-type of (Item being manipulated)) Equal to ItemType[2]
          • (Item-type of (Item being manipulated)) Equal to ItemType[3]
          • (Item-type of (Item being manipulated)) Equal to ItemType[4]
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • 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
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Integer A) Equal to 1
                      • (Integer A) Equal to 2
                      • (Integer A) Equal to 3
                      • (Integer A) Equal to 4
                  • (Integer B) Not equal to 1
                  • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to ItemType[(Integer A)]
                  • (Item-type of (Item carried by (Hero manipulating item) in slot 2)) Equal to ItemType[(Integer A)]
                  • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
                  • (Item carried by (Hero manipulating item) in slot 2) Not equal to (Item being manipulated)
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of (Item being manipulated)) Equal to ItemType[(Integer A)]
                    • Then - Actions
                      • Item - Remove (Item carried by (Hero manipulating item) in slot 2)
                      • Item - Remove (Item carried by (Hero manipulating item) in slot (Integer B))
                      • Item - Remove (Item being manipulated)
                      • Hero - Create ItemType[((Integer A) + 1)] and give it to (Hero manipulating item)
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Integer A) Equal to 1
                      • (Integer A) Equal to 2
                      • (Integer A) Equal to 3
                      • (Integer A) Equal to 4
                  • (Integer B) Not equal to 2
                  • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to ItemType[(Integer A)]
                  • (Item-type of (Item carried by (Hero manipulating item) in slot 3)) Equal to ItemType[(Integer A)]
                  • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
                  • (Item carried by (Hero manipulating item) in slot 3) Not equal to (Item being manipulated)
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of (Item being manipulated)) Equal to ItemType[(Integer A)]
                    • Then - Actions
                      • Item - Remove (Item carried by (Hero manipulating item) in slot 3)
                      • Item - Remove (Item carried by (Hero manipulating item) in slot (Integer B))
                      • Item - Remove (Item being manipulated)
                      • Hero - Create ItemType[((Integer A) + 1)] and give it to (Hero manipulating item)
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Integer A) Equal to 1
                      • (Integer A) Equal to 2
                      • (Integer A) Equal to 3
                      • (Integer A) Equal to 4
                  • (Integer B) Not equal to 3
                  • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to ItemType[(Integer A)]
                  • (Item-type of (Item carried by (Hero manipulating item) in slot 4)) Equal to ItemType[(Integer A)]
                  • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
                  • (Item carried by (Hero manipulating item) in slot 4) Not equal to (Item being manipulated)
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of (Item being manipulated)) Equal to ItemType[(Integer A)]
                    • Then - Actions
                      • Item - Remove (Item carried by (Hero manipulating item) in slot 4)
                      • Item - Remove (Item carried by (Hero manipulating item) in slot (Integer B))
                      • Item - Remove (Item being manipulated)
                      • Hero - Create ItemType[((Integer A) + 1)] and give it to (Hero manipulating item)
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Integer A) Equal to 1
                      • (Integer A) Equal to 2
                      • (Integer A) Equal to 3
                      • (Integer A) Equal to 4
                  • (Integer B) Not equal to 4
                  • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to ItemType[(Integer A)]
                  • (Item-type of (Item carried by (Hero manipulating item) in slot 5)) Equal to ItemType[(Integer A)]
                  • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
                  • (Item carried by (Hero manipulating item) in slot 5) Not equal to (Item being manipulated)
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of (Item being manipulated)) Equal to ItemType[(Integer A)]
                    • Then - Actions
                      • Item - Remove (Item carried by (Hero manipulating item) in slot 5)
                      • Item - Remove (Item carried by (Hero manipulating item) in slot (Integer B))
                      • Item - Remove (Item being manipulated)
                      • Hero - Create ItemType[((Integer A) + 1)] and give it to (Hero manipulating item)
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Integer A) Equal to 1
                      • (Integer A) Equal to 2
                      • (Integer A) Equal to 3
                      • (Integer A) Equal to 4
                  • (Integer B) Not equal to 5
                  • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to ItemType[(Integer A)]
                  • (Item-type of (Item carried by (Hero manipulating item) in slot 6)) Equal to ItemType[(Integer A)]
                  • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
                  • (Item carried by (Hero manipulating item) in slot 6) Not equal to (Item being manipulated)
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of (Item being manipulated)) Equal to ItemType[(Integer A)]
                    • Then - Actions
                      • Item - Remove (Item carried by (Hero manipulating item) in slot 6)
                      • Item - Remove (Item carried by (Hero manipulating item) in slot (Integer B))
                      • Item - Remove (Item being manipulated)
                      • Hero - Create ItemType[((Integer A) + 1)] and give it to (Hero manipulating item)
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Integer A) Equal to 1
                      • (Integer A) Equal to 2
                      • (Integer A) Equal to 3
                      • (Integer A) Equal to 4
                  • (Integer B) Not equal to 6
                  • (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to ItemType[(Integer A)]
                  • (Item-type of (Item carried by (Hero manipulating item) in slot 1)) Equal to ItemType[(Integer A)]
                  • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
                  • (Item carried by (Hero manipulating item) in slot 1) Not equal to (Item being manipulated)
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item-type of (Item being manipulated)) Equal to ItemType[(Integer A)]
                    • Then - Actions
                      • Item - Remove (Item carried by (Hero manipulating item) in slot 1)
                      • Item - Remove (Item carried by (Hero manipulating item) in slot (Integer B))
                      • Item - Remove (Item being manipulated)
                      • Hero - Create ItemType[((Integer A) + 1)] and give it to (Hero manipulating item)
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
 
Last edited:
Level 6
Joined
Nov 28, 2007
Messages
203
no.. 3claws of attack +1 should be upgraded into 1 claws of attack +2 ^^
and what do u mean with "So you finish research?"

[Edit]:
@ Ghostwolf: nope, ur trigger is for upgrading 2 items into 1 better and mine is for upgrading 3 items into 1 better.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
You could always just put all possible combinations in the inventory (pretty childish lol) like this :p

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 1))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 2))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 2))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 3))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 3))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 4))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 4))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 5))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 5))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 6))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 6))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 1))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 6))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 2))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 6))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 3))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 6))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 4))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 5))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 1))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 5))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 2))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 5))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 3))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 4))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 1))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 4))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 2))
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 3))
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot 1))
    • Then - Actions
      • Actions
    • Else - Actions

I think this is a lot more simple.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Ghostwolf, that only works for 2 items.

3 claws of attack + 1 totals up to +3 attack, why would ANYONE want it to be "upgraded" into +2 attack???

  • Events
    • Unit - a unit gains an item
  • Conditions
    • Item type of acquired item = AttackClaws[1]
    • Item type of acquired item = AttackClaws[2] etc
  • Actions
    • For integer A from 1 to 6 do
      • Loop - actions
        • If Item type of item being manipulated = item type carried in slot[integer A] then do ...
          • Then - actions
            • For integer B from 2 to 6 do
              • If Integer B not equal to integer A AND item type of item being manipulated = item type carried in slot[integer B]
              • Then - actions
                • For integer C from 3 to 6 do
                  • If Integer C not equal to B and A AND item type of item being manipulated = item type carried in slot[integer C]
                  • Then - actions
                    • Item - remove items in slot A, B and C
                    • Item - create an item of item type whatever
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Ok so I have 1 item of the type in slot 1. I pick the new item up, it comes in slot 2, the trigger is fired. Upon checking the conditions, I have both items in slot 1 and 2, and therefor the +2 item is created while I only have 2 items. You see? That's where your trigger goes wrong.
 
Status
Not open for further replies.
Top