• 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.

[Trigger] Help combine 2 same items

Status
Not open for further replies.
Level 2
Joined
Mar 22, 2018
Messages
7
Hi i'm trying to do next:

I'm trying to combine 2 same items (without recepie) simplest way possible.

Example:

2x Gauntlets of Ogre Strength +3 -> Belt of Giant Strength +6.

*****

I tried this way, but as soon as u pick one Gauntlets of Ogre Strength +3 u automatically get Belt of Giant Strength +6 in inventory.

Conditions:
((Triggering unit) has an item of type Gauntlets of Ogre Strength +3) Equal to True
((Triggering unit) has an item of type Gauntlets of Ogre Strength +3) Equal to True

Actions:
then remove both items and give Belt of Giant Strength +6.

*****

So what to do
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Can someone send me example or write me whole stuff up here on forum.
Chaosy kind of did, although it was wrong...
counter = 0
loop from 1 to 6
if(item carried by unit in slot index is equal to yourItem)
counter = counter + 1

if counter is equal to 2
Should have been...
counter = 0
loop for index from 1 to 6
-> if (item type of item carried by unit in slot index is equal to yourCraftingItemType) then
->-> counter = counter + 1

if (counter is greater than or equal to 2) then
loop for index from 1 to 2
-> Remove (item of item type yourCraftingItemType in inventory of unit)
 
Last edited:
Level 12
Joined
Mar 24, 2011
Messages
1,082
Hi.

i'm having problems find Counter.

Under trigger wich category is located?
Counter is a custom variable that you have to make yourself.

There is a yellow X button on top of the trigger editor, between the "redo" & "new category" buttons.
Click that, it will open the variables editor.
You want to make a new variable, call it "Counter" (or better "temp_Int") with type "Integer".
 
Status
Not open for further replies.
Top