Item Recipe - Identical items [Help]

Malice-

Endlessly Known
Reaction score
34
So, I have a recipe to combine boots of speed to make "Boots of speed 2" when two of them are acquired, but it only works if i have NO OTHER items in my inventory. I can't really figure out why, either

Here is my faulty trigger:

Code:
Boots of Speed Upgrade
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Boots of Speed
    Actions
        Set Boots_Count[(Player number of (Owner of (Triggering unit)))] = 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
                        Boots_Count[(Player number of (Owner of (Triggering unit)))] Equal to 0
                        (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Boots of Speed
                    Then - Actions
                        Set Boots_Count[(Player number of (Owner of (Triggering unit)))] = (Boots_Count[(Player number of (Owner of (Triggering unit)))] + 1)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Boots_Count[(Player number of (Owner of (Triggering unit)))] Equal to 1
                                (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Boots of Speed
                            Then - Actions
                                Set Boots_Count[(Player number of (Owner of (Triggering unit)))] = -1
                                Item - Remove (Item carried by (Triggering unit) of type Boots of Speed)
                                Wait 0.00 seconds
                                Item - Remove (Item carried by (Triggering unit) of type Boots of Speed)
                                Special Effect - Create a special effect at (Position of (Hero manipulating item)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
                                Item - Create Boots of Speed 2 at (Position of (Triggering unit))
                                Hero - Give (Last created item) to (Triggering unit)
                                Wait 2.00 seconds
                                Special Effect - Destroy (Last created special effect)
                            Else - Actions
                                Trigger - Run Boots of Speed Upgrade 2 <gen> (checking conditions)

Any suggestions?
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
ohhh

well then I got nothing, I just "stand on the shoulders of giants"
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,497
Set TempInteger = 0
For each Integer A from 1 to 6
- If Item-type of (Item carried by (Triggering unit) in slot (Integer A)) equal to ... then
- - Set TempInteger = TempInteger + 1

If TempInteger greater than or equal to 2 then
- Item - Remove ...
- Item - Remove ...
- Hero - Create <better item> for (Triggering unit)
 

NullCurrent

( ゚ε ゚)
Reaction score
110
Or maybe
Code:
Boots of Speed 2
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Boots of Speed
        (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Boots of Speed
    Actions
        Item - Remove (Item carried by (Triggering unit) in slot 1)
        Item - Remove (Item carried by (Triggering unit) in slot 2)
        Item - Boots of Speed 2 at (Position of (Triggering unit))
I dunno if that works too, but u can try =]
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,497
> I dunno if that works too

Sort of. But only if you have those items in precisely slots 1 and 2... a feature I'd consider a major bug in the map.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
This is what I use:

Code:
Windsword
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type [B]Orb of Lightning[/B]) 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 (Triggering unit) in slot (Integer A))) Equal to [B]Orb of Lightning[/B]
                    Then - Actions
                        Item - Set the custom value of (Item being manipulated) to ((Custom value of (Item being manipulated)) + 1)
                    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of (Item being manipulated)) Equal to 2
            Then - Actions
                For each (Integer A) from 1 to 2, do (Actions)
                    Loop - Actions
                        Item - Remove (Item carried by (Triggering unit) of type [B]Orb of Lightning[/B])
                Hero - Create [B]Windsword[/B] and give it to (Triggering unit)
                Game - Display to (Player group((Triggering player))) the text: Your items combined...
            Else - Actions
Change the bolded parts.
It works for me
 

Malice-

Endlessly Known
Reaction score
34
Thanks for the help guys - i haven't tried your suggestions yet but just saw the responses and wanted to say thanks in advance.
 

Ithladir

Member
Reaction score
5
This is what I use:

Code:
Windsword
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type [B]Orb of Lightning[/B]) 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 (Triggering unit) in slot (Integer A))) Equal to [B]Orb of Lightning[/B]
                    Then - Actions
                        Item - Set the custom value of (Item being manipulated) to ((Custom value of (Item being manipulated)) + 1)
                    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of (Item being manipulated)) Equal to 2
            Then - Actions
                For each (Integer A) from 1 to 2, do (Actions)
                    Loop - Actions
                        Item - Remove (Item carried by (Triggering unit) of type [B]Orb of Lightning[/B])
                Hero - Create [B]Windsword[/B] and give it to (Triggering unit)
                Game - Display to (Player group((Triggering player))) the text: Your items combined...
            Else - Actions
Change the bolded parts.
It works for me

Well it tried it too but when the combining happens it only removes 1 of the 2 items that u need for the better item. So i end up with "weak item nr1" and "new strong item" too. Would very much appreciate if you or anyone would find a solution to it ^^. (tho thanks for trigger and your name will appear in cred list (if u wanna).)
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
This is the recipe that I am useing for combo items, hope it helps :)


Code:
Orb of Nitro 2
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        Set Count = 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
                        Count Equal to 0
                        (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Orb of Nitro [LVL 1]
                    Then - Actions
                        Set Count = 1
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Count Equal to 1
                                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Orb of Nitro [LVL 1]
                            Then - Actions
                                Set Count = -1
                                Item - Remove (Item carried by (Hero manipulating item) of type Orb of Nitro [LVL 1])
                                Wait 0.00 seconds
                                Item - Remove (Item carried by (Hero manipulating item) of type Orb of Nitro [LVL 1])
                                Hero - Create Orb of Nitro [LVL 2] and give it to (Hero manipulating item)
                            Else - Actions
 

Ithladir

Member
Reaction score
5
Well i will start with thanks for a new trigger to try, tho "Count" is your integer right? (i will try this right away!) :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top