HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item combining trigger help

05-12-2005, 11:39 PM#1
Guest
ok i have these variables:

Set Items[6] = Mask of Insanity - 1500
Set Items[7] = Mask of Death
Set Items[8] = Crown of Kings +5

and i want the "mask of death" and the mask of "insanity-1500" to combine to create my "mask of insanity" and my trigger for itme combing does groups of threes so i set the "no item" to crown of kings but when i get a mask and then the recipe they combine into nothing but when i get the recipie then the mask it combines perfectly...could some one check this and tell me where i screwed up:

Code:
Item Sytem
    Events
        Unit - A unit Acquires an item
    Conditions
    Actions
        For each (Integer D) from 0 to 2, do (Actions)
            Loop - Actions
                For each (Integer A) from 1 to 6, do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Items[(D x 3)]
                            Then - Actions
                                For each (Integer B) from 1 to 6, do (Actions)
                                    Loop - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Item-type of (Item carried by (Triggering unit) in slot (Integer B))) Equal to Items[((D x 3) + 1)]
                                                (Integer B) Not equal to (Integer A)
                                            Then - Actions
                                                For each (Integer C) from 1 to 6, do (Actions)
                                                    Loop - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                Or - Any (Conditions) are true
                                                                    Conditions
                                                                        Items[((D x 3) + 2)] Equal to Crown of Kings +5
                                                                        (Item-type of (Item carried by (Triggering unit) in slot C)) Equal to Items[((D x 3) + 2)]
                                                                C Not equal to (Integer A)
                                                                C Not equal to (Integer B)
                                                            Then - Actions
                                                                Item - Remove (Item carried by (Triggering unit) in slot (Integer A))
                                                                Item - Remove (Item carried by (Triggering unit) in slot (Integer B))
                                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    If - Conditions
                                                                        Items[((D x 3) + 2)] Equal to Crown of Kings +5
                                                                    Then - Actions
                                                                    Else - Actions
                                                                        Item - Remove (Item carried by (Triggering unit) in slot C)
                                                                Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
                                                                Special Effect - Destroy (Last created special effect)
                                                                Hero - Create ResultingItem[D] and give it to (Triggering unit)
                                                            Else - Actions
                                            Else - Actions
                            Else - Actions
05-12-2005, 11:55 PM#2
Guest
more info: i did a different combination with 3 items and it deletes the item you make if you get the second item first. The mask of death is the second item also. so now we just need to figure out why its always deletes the resulting item if the first item you buy is the second item...
05-13-2005, 07:05 AM#3
Anitarf
After you create the result item for the hero, use the "skip remaining actions" action. Without it, you are just asking for trouble, allowing the trigger to run after it has done it's job, not to mention that action calls this trigger again and once it runs, all your variables are messed up. I'm still not sure how that could cause the error you are describing, but maybe it does and this will fix it...
05-13-2005, 02:58 PM#4
Guest
thnx! i'll look into it
05-13-2005, 03:10 PM#5
Guest
omg i love u! Errr not that type of love but yeah anyways it worked thnx!


btw: i tried giving rep but this computer has problems so when i get on a different one i'll give it to you.
05-16-2005, 02:15 PM#6
Burning_Dragoon
Great trigger