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

Recipe System

Status
Not open for further replies.
Level 11
Joined
Jul 9, 2009
Messages
927
How can I make an item recipe which needs 2 items of the same kind ?

For example Dragon Sword needs two Dragon Heart and a recipe
when I try to make the trigger, and I double the item needed. The recipe still works even if my Inventory only has one Dragon Heart and the Recipe.

If anyone knows how to solve this, please help. Thanks in Advanced :)
 
Level 11
Joined
Jul 9, 2009
Messages
927
  • Dragon Sword
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Hero manipulating item) has an item of type Dragon Heart) Equal to True
          • ((Hero manipulating item) has an item of type Dragon Heart) Equal to True
          • ((Hero manipulating item) has an item of type Dragon Sword Recipe) Equal to True
        • Then - Actions
          • Set ItemPoint = (Position of (Hero manipulating item))
          • Item - Remove (Item carried by (Hero manipulating item) of type Dragon Heart)
          • Item - Remove (Item carried by (Hero manipulating item) of type Dragon Heart)
          • Item - Remove (Item carried by (Hero manipulating item) of type Dragon Sword Recipe)
          • Item - Create Dragon Sword at ItemPoint
          • Special Effect - Create a special effect at ItemPoint using Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Hero - Give (Last created item) to (Hero manipulating item)
          • Custom script: call RemoveLocation(udg_ItemPoint)
        • Else - Actions
But, it does not check the amount of dragon heart's I have. Even if I only had one Dragon heart and the recipe, the sword would still be forged.

Any ideas ? :/
 
Level 11
Joined
Jul 9, 2009
Messages
927
yes, that is the question I am trying to say. How can I check if there are 2 dragon hearts in the inventory ? :)
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
There are a lot of recipe systems you can use
For example .. *points at sig*
If u don't want to use JNGP, use Diablo-Dk's
it's in vanilla Jass so you can use it with the normal editor

I tried to search for more which would only use GUI
and I found a tut.

anyway, thanks to everyone who tried to help, +rep

Do what mag does, ive been using it and its efficient and easy to use. That tutorial you linked is too much work, when mag's system is a single line of code
 
Status
Not open for further replies.
Top