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

Item Recipes

Status
Not open for further replies.
Level 3
Joined
Dec 30, 2004
Messages
29
I was wondering how you create item recipes, (not how to create the item, but the trigger which makes the two items come one or so, e.g.

You buy a claw of attack +12, a claw of attack +8 and a "recipe: Superclaw" when you get those three items and have them at the same time in your inventory, they transform automatically and becomes 1 - the superclaw :)

how? :?
 
Level 7
Joined
May 16, 2004
Messages
355
I might be able to help, I just muddled my way through figuring it out, I made my trigger be a timed thing, every 0.5 seconds it picks every hero on the map and then there are several if/then/else statments, eahc one is for a different item. It would be like
if Condition- Picked unit has- Items needed
Then-remove rquired items
-create one (new item) at position of picked unit
-give last created item to picked unit

Then the else is used to make the other items, this works fairly well and with a minimum of lag to it, hope this helps
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Like Drain Pipe mention but shouldn't there be some way to ask the owner if he wants to get the items combined or not? Like in Heroes of Might and Magic with items like "Angelic Alliance" combined from more items. And like in heroes, you might choose to lock the positions where those items were and if you drop the item, the locks turn back into the normal items and the dropped one turns into the last item. Just an idea... ;)

Daelin
 
Level 3
Joined
Dec 30, 2004
Messages
29
Daelin said:
Like Drain Pipe mention but shouldn't there be some way to ask the owner if he wants to get the items combined or not? Like in Heroes of Might and Magic with items like "Angelic Alliance" combined from more items. And like in heroes, you might choose to lock the positions where those items were and if you drop the item, the locks turn back into the normal items and the dropped one turns into the last item. Just an idea... ;)

Daelin

An idea that would be hella hard to make.. no idea how to :(
 
Level 7
Joined
May 16, 2004
Messages
355
Why Drain Pipe why?? Why must you just reiterate what I said? oh well, for the thing that decides if you want it melded make the receipe require a receipe that way you buy it once you want it, it acts as the descriminate of whether or not you really want the item or are goign for somethng else by accident. And to unmeld you could make a reverse receipe that once you get it destroys your item and gives back what you had previously
 
Level 3
Joined
Dec 30, 2004
Messages
29
Events:
Unit - A unit acquires an item

Conditions:
Item-type of (item being manipulated) equal to "blueprint: Poleaxe of Destrucion"
Actions:
If (All Conditions are True) then do (then actions) else do (else actions)
If - Conditions:
And - all (conditions) are true
Conditions
((Hero manipulating item) has an item of type Ancestral Staff) equal to true
((Hero manipulating item) has an item of type Ancestral Staff) equal to true
Then - actions
Item - remove the items
Hero - create item and give to hero.

This is what i came up with, although. It only works if you buy the recipe as a last component... Any idea how to change it so that you can buy them in any order? like blueprint, item 1 item 2?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Well... you will need three triggers each for a separate item. So, something like this:

Condition - Item 2 being acquired
Actions - IF (AND ALL CONDITIONS) - Item 1 in inventory
- Item 3 in inventory

And in the other triggers you just change item 2 with item 1 and item 1 with item 2. And in the last one, item 2 with item 3 and item 3 with item 2. That is all.

~Daelin
 
Level 10
Joined
Apr 9, 2004
Messages
502
Daelin's works better than yours, as it is only checking when need be. Believe it or not, your trigger would lag so much, the game couldn't be played. Trust me on this because i;ve created triggers that checked every possible instance for a condition, and that pretty much lagged the game to the point of making it impossible to play.
 
Level 9
Joined
Jan 13, 2005
Messages
553
Here is my idea,

Perhaps, you need a story to be more dramatic. Suppose that in your map there is a magical place called Item Palace that transform two items into one powerful item. So to make it happen you will do these things:

1. customize 3 items namely A,B,C where A + B = C
2. Make a trigger:

ITEM PALACE:
E: a unit enters REGION

C: Entering unit has an item type A & Entering unit has an item B

A:
If all conditions are true then remove items from the entering unit & create item C for the entering unit
 
Level 8
Joined
Nov 27, 2004
Messages
251
Well the recipes are done like this.
the combiantio is item a+b give C
Trigger
EVENT-Unit aquires item.
CONDITIONS-Boolean(triggering unit has item of type a:=true and triggering unit has item of type b:=true
ACTIONS-Item remove item carried by tiggering unit of type a.
-Item remove item carried by triggering unit of type b.
-Sound play sound(optional for FX)
-Special fx (using XX/XXXXX/XXXXXX.mdl) the fx u want.
-Hero create item of type C and give it to triggerning unit.

Basicly this is it.

i hope it was useful .

Nantuko_Husk
 
Status
Not open for further replies.
Top