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
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
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...
DaelinLike 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
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
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?
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.
NONONONO! there is an easier way, instead make a trigger that searches every second for the conditions, that way once they have the items it does what its supposed to
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.
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
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.