| 07-07-2005, 10:14 AM | #1 |
Hello, Im actually handing the merging items thingy quite well, but this little problem makes me confused .. I wanted to make 2 similiar items to be merged to produce a better item, but I just cant figure out the Interger Comparison in the Conditions part .. Anybody have any better ideas ? |
| 07-07-2005, 02:46 PM | #2 |
Could you explain the problem more? You want 2 items to merge into 1 thats better? (like 1 health potion + 1 mana potion = 1 replenishment potion?) Why do you use the integer comparsion? Use the Item-type Comparsion instead, maybe you find your problem there. |
| 07-07-2005, 03:23 PM | #3 |
Well, yeah I used the Item-Comparison thingy. But I wanted to make Potion of healing + Potion of healing = super potion. I wanted to make 2 same items to become a stronger item... yeah. You know how to do it ? |
| 07-07-2005, 04:09 PM | #4 |
Well the only way I can up with now without WE is that you check If the hero got 1 potion in slot 1 and the same kind in slot 2 and then remove them, and create a super potion. Though I think there is an way to be able to not just use slot 1,2 |
| 07-07-2005, 06:09 PM | #5 |
There's a bunch of item merging systems in the repository. |
| 07-07-2005, 06:28 PM | #6 |
I can give you this trigger, but this shows that you can just buy it from a shop and it will combine to two items together with their gold cost. all you have to do is set the item to be combined into, without abilities/gold cost (first part of the trigger), and another same item with the abilities and the gold cost of the two items you combined. That way, you can combine two items, and sell the combined into item for their price together. Code:
Specific Item Merge
Events
Unit - A unit Sells an item (from shop)
Conditions
(Item-type of (Sold Item)) Equal to <Item You Want to be the result of 2 items without the cost and without abilities>
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Buying unit) has an item of type <Item 1> Equal to False) or ((((Buying unit) has an item of type <item 2> Equal to False)
Then - Actions
Wait 0.01 seconds
Item - Remove (Item carried by (Buying unit) of type <Item You Want to be the result of 2 items without the cost and without abilities>))
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(((Buying unit) has an item of type <item1> Equal to True) and ((((Buying unit) has an item of type <item2>)) Equal to True)
Then - Actions
Wait 0.01 seconds
Item - Remove (Item carried by (Buying unit) of type <Item You Want to be the result of 2 items without the cost and without abilities>
Item - Create <Item You Want to be the result of 2 items with the cost of the two items and with abilities> at (Position of (Buying unit))
Special Effect - Create a special effect attached to the overhead of (Buying unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
Special Effect - Destroy (Last created special effect)
Item - Remove (Item carried by (Buying unit) of type <item1>))
Item - Remove (Item carried by (Buying unit) of type <item2>))
Unit - Order (Buying unit) to Right-Click (Last created item)
Else - Actions
Do nothing |
