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

How can I done this? - item recipe with 2 same item

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2013
Messages
1,105
Look for many of the item recipe systems here on hive. I recall deathismyfriend having a nice one.

Or

Check when the unit acquires the item and check if it has the other required items, and remove them and give them the completed item.
 
Level 12
Joined
Nov 13, 2010
Messages
254
you can do this
Events
Unit - A unit Acquires an item

Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item Recipe) Equal to (==) True
Then - Actions
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item Recipe)
Hero - Create name of item and give it to (Triggering unit)
and if you like you can add a Special Effect
Else - Actions
 
Level 9
Joined
Feb 15, 2013
Messages
372
you can do this
Events
Unit - A unit Acquires an item

Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item Recipe) Equal to (==) True
Then - Actions
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item Recipe)
Hero - Create name of item and give it to (Triggering unit)
and if you like you can add a Special Effect
Else - Actions

Do this work to the same item together?
 
Level 11
Joined
Dec 19, 2012
Messages
411
you can do this
Events
Unit - A unit Acquires an item

Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item) Equal to (==) True
((Hero manipulating item) has an item of type name of item Recipe) Equal to (==) True
Then - Actions
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item)
Item - Remove (Item carried by (Hero manipulating item) of type name of item Recipe)
Hero - Create name of item and give it to (Triggering unit)
and if you like you can add a Special Effect
Else - Actions

It won't work because if unit acquires an item, all the above conditions is full fill ( the trigger wont check whether the unit has 2 same item type) and will still execute this buggy trigger.

In order to make it work, you must use loop function to check through all the Triggering Unit's slot ( to know whether the unit has how many same type of item) and if he has 2 (or more depend on your item recipe), run the actions.
 
Level 9
Joined
Feb 15, 2013
Messages
372
It won't work because if unit acquires an item, all the above conditions is full fill ( the trigger wont check whether the unit has 2 same item type) and will still execute this buggy trigger.

In order to make it work, you must use loop function to check through all the Triggering Unit's slot ( to know whether the unit has how many same type of item) and if he has 2 (or more depend on your item recipe), run the actions.

So you mean i needed to check Integer A from 1 to 6?
 
Status
Not open for further replies.
Top