Item combo trigger problem... again

BlightWarden

New Member
Reaction score
6
My old triggers crash the editor so now I have to start from scratch.:banghead:

Like before the item combo trigger is giving me problems, so here I am seeking help. My trigger is listed below, what did I do wrong or what did I forget? How do I fix it. Thanks.

Event
Unit- A unit aquires an item

Conditions
And-All (conditions) are true
((Hero manipulating item) has (item carried by (hero manipulating item) of type [item A] equal to true

((Hero manipulating item) has (item carried by (hero manipulating item) of type [item B] equal to true

Actions
Item- Remove (item carried by (hero manipulating item) of type [item a]
Item- Remove (item carried by (hero manipulating item) of type [item b]
hero- Create itemC and give it to (hero manipulating item)


Thanks for any and all help!
 

Galdiuz

Creator of Photon Command
Reaction score
98
Code:
Combine
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type ItemA) Equal to True
        ((Triggering unit) has an item of type ItemB) Equal to True
    Actions
        Item - Remove (Item carried by (Triggering unit) of type ItemA)
        Item - Remove (Item carried by (Triggering unit) of type ItemB)
        Hero - Create ItemC and give it to (Triggering unit)

That should do it.
 

BlightWarden

New Member
Reaction score
6
Code:
Combine
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type ItemA) Equal to True
        ((Triggering unit) has an item of type ItemB) Equal to True
    Actions
        Item - Remove (Item carried by (Triggering unit) of type ItemA)
        Item - Remove (Item carried by (Triggering unit) of type ItemB)
        Hero - Create ItemC and give it to (Triggering unit)

That should do it.

Didn't work. I'v tried it a few ways and it doesn't seem to work. I found an old explaination of the trigger which is my first one and even it doesn't work. All my other triggers work fine except this one.:banghead:
 

Galdiuz

Creator of Photon Command
Reaction score
98
I just tried it, and it worked fine... Are you sure you're not doing anything wrong?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Didn't work

"It doesn't work" is not a very good problem description.
Trigger problems are best helped with by posting said triggers.
 

BlightWarden

New Member
Reaction score
6
> Didn't work

"It doesn't work" is not a very good problem description.
Trigger problems are best helped with by posting said triggers.

I'v used my trigger and the other guys trigger to try to combine two items into a single new item. I'v placed items on the ground and picked them up with my hero and that did nothing, I'v placed them in a shop and bought them and that did nothing although when I buy an item it is place on the ground and not in my inventory and I must pick it up.

My triggers are exactly written as they are shown, I had a working combination trigger before but it crashes when I load my trigger set so I can't see whats different. I have no idea why its not working.

I don't know how to explain it in greater detail other than to say its not doing anything as if its not enabled, which it is. Everything points to it working yet its not. The only thing different is I am forced to use a home pc instead of my laptop but that hasn't affected any of my other triggers.

My items are also exact, I'm not using the wrong items in play from the trigger.

Maybe the problem lies in items not going directly into my inventory when I buy them? Which could be preventing the trigger from working? How do I buy an Item from a shop and making it go directly into my inventory instead of dropping on the ground?

Again thanks for the help.
 

Galdiuz

Creator of Photon Command
Reaction score
98
You maybe could try some other items? I used Claws of attack +3 and +6 to make a +12. Try if that works.
 

BlightWarden

New Member
Reaction score
6
You maybe could try some other items? I used Claws of attack +3 and +6 to make a +12. Try if that works.


I'v used +12 claws and +4 ring, +15 claws and +5 ring, Mask of death and gloves of haste. No difference. I think the problem lies in my hero not getting items to go directly into his inventory. I am unsure but that seems to be a problem.

When you buy an item in your games does it drop to the ground or go into the inventory? I remember mine used to go into inventory so I don't know whats wrong.
 

Galdiuz

Creator of Photon Command
Reaction score
98
When I tried I bought directly from a shop, but ''Unit - A unit Acquires an item'' should work anyway. No idea why items drop on ground. Maybe it is becaue your unit doesn't have a hero inventory? Or the shop has ''Pick unit'', not ''pick hero''?
 

rDs_RaVeN

New Member
Reaction score
14
im using this:
Code:
Item C Recipe
    Events
        Unit - A unit Acquires an item
    Conditions
        And - All (Conditions) are true
            Conditions
                ((Hero manipulating item) has an item of type Item A) Equal to True
                ((Hero manipulating item) has an item of type Item B) Equal to True
    Actions
        Item - Remove (Item carried by (Hero manipulating item) of type Item A)
        Item - Remove (Item carried by (Hero manipulating item) of type Item B)
        Item - Create Item C at (Position of (Hero manipulating item))
        Special Effect - Create a special effect at (Position of (Hero manipulating item)) using Abilities\Spells\Items\AIem\AIemTarget.mdl
        Hero - Give (Last created item) to (Hero manipulating item)
        Wait 2.00 seconds
        Special Effect - Destroy (Last created special effect)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> I'm using this

The "and" is not needed, as conditions already are "and" by nature.

The two "item - create" and "Hero - give" actions can be combined into one: "Hero - Create item for Hero".


> Wait 2.00 seconds
> Special Effect - Destroy (Last created special effect)

Bad.
If another trigger happens to create an effect while this one is waiting, or simply run a second time,
you're going to destroy the wrong effect.

Remove the "wait".


> My triggers are exactly written as they are shown

Well... difficult to say without seeing them.
 

BlightWarden

New Member
Reaction score
6
When I tried I bought directly from a shop, but ''Unit - A unit Acquires an item'' should work anyway. No idea why items drop on ground. Maybe it is becaue your unit doesn't have a hero inventory? Or the shop has ''Pick unit'', not ''pick hero''?

Switched buildings, was using the arcane workshop and now I'm using the goblin merchant (Neutral passive) so the items went to my inventory but did not combine. One problem solves one remains...:banghead:

My items and triggers are correct so I have no idea whats wrong. I'm using the paladin hero with an empty inventory.


OK! Something new just happened. I bought 1 claw and 1 ring, nothing happened,so I bought 1 more claw and it combined into the mask of death (my desired item) but I now have another claw.

so for some reason its requiring 2 of 1 one item (claw or ring) and 1 of the other? But the trigger isn't written like that... Any ideas?:eek:
 

BlightWarden

New Member
Reaction score
6
>

> My triggers are exactly written as they are shown

Well... difficult to say without seeing them.


I listed my trigger in my first post.



(this is my original trigger from OP)
Event
Unit- A unit aquires an item

Conditions
And-All (conditions) are true
((Hero manipulating item) has (item carried by (hero manipulating item) of type [item A] equal to true

((Hero manipulating item) has (item carried by (hero manipulating item) of type [item B] equal to true

Actions
Item- Remove (item carried by (hero manipulating item) of type [item a]
Item- Remove (item carried by (hero manipulating item) of type [item b]
hero- Create itemC and give it to (hero manipulating item)







( this is the other trigger which I am currently testing and having mixed results with, for some reason it takes 3 items instead of two to combine, 2 of any one item and 1 of the other and it combines. So now I need to fix that so its 1 and 1 and everything will be perfect)
Events
Unit - A unit Acquires an item
Conditions
((Triggering unit) has an item of type ItemA) Equal to True
((Triggering unit) has an item of type ItemB) Equal to True
Actions
Item - Remove (Item carried by (Triggering unit) of type ItemA)
Item - Remove (Item carried by (Triggering unit) of type ItemB)
Hero - Create ItemC and give it to (Triggering unit)



Thanks again, I'm making progress.:eek:
 

Galdiuz

Creator of Photon Command
Reaction score
98
There is another solution. Not sure if it will work, but you can try it.
Set ''Actively Used'' and ''Use automatically when acquired'' to true for the items. Then you change the trigger to this:
Code:
Events
Unit - A unit Uses an item
Conditions
((Item-type of (Item being manipulated)) Equal to ItemA) or ((Item-type of (Item being manipulated)) Equal to ItemB)
((Triggering unit) has an item of type ItemA) Equal to True
((Triggering unit) has an item of type ItemB) Equal to True
Actions
Item - Remove (Item carried by (Triggering unit) of type ItemA)
Item - Remove (Item carried by (Triggering unit) of type ItemB)
Hero - Create ItemC and give it to (Triggering unit)

Try and see if that works.
Also, use [-CODE]Trigger[-/CODE] without the - when posting a trigger.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
You know that you can right-click your trigger's name, use "copy as text" and paste it here?
Much simpler than typing it by hand. (It also shows the exact trigger...)


> Try and see if that works.

The trigger from post #2 works just fine.
And certainly does not have the potential for the perceived problems coming from it...
 

Galdiuz

Creator of Photon Command
Reaction score
98
True, but it's not working for him, so i made an alternative. (That maybe doesn't work at all)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> it's not working for him

That would be why I asked to see his version of that trigger... one can always hope, can't one?


> ((Item-type of (Item being manipulated)) Equal to ItemA) or ((Item-type of (Item being manipulated)) Equal to ItemB)

No, that condition is not needed. (And doesn't change the result either by the way.)
However, the event is now wrong. "acquires an item" was correct already... :p
 

BlightWarden

New Member
Reaction score
6
You know that you can right-click your trigger's name, use "copy as text" and paste it here?
Much simpler than typing it by hand. (It also shows the exact trigger...)


> Try and see if that works.

The trigger from post #2 works just fine.
And certainly does not have the potential for the perceived problems coming from it...

I know but the game is on my home pc which is not internet active and I'm using my laptop to ask questions so its not possible to copy paste the triggers. The triggers are exactly the same, I'v tripple checked my work and more, whats posted is the exact trigger written out with no variation or errors. Word for word.

The second trigger does work but the problem is instead of 1 claw +1 ring = new item its, 2 claws and 1 ring or 1 claw and 2 rings= new item. Which isn't the way its written. Its exactly like its posted (trigger set 2).

I just have no idea whats wrong and regardless if it shouldn't have the problem, it still does and I need to figure out how to fix it.




There is another solution. Not sure if it will work, but you can try it.
Set ''Actively Used'' and ''Use automatically when acquired'' to true for the items. Then you change the trigger to this:
Code:
Events
Unit - A unit Uses an item
Conditions
((Item-type of (Item being manipulated)) Equal to ItemA) or ((Item-type of (Item being manipulated)) Equal to ItemB)
((Triggering unit) has an item of type ItemA) Equal to True
((Triggering unit) has an item of type ItemB) Equal to True
Actions
Item - Remove (Item carried by (Triggering unit) of type ItemA)
Item - Remove (Item carried by (Triggering unit) of type ItemB)
Hero - Create ItemC and give it to (Triggering unit)

Try and see if that works.

the items drop straight to the ground and I am unable to pick them up at all. lol. So I don't think I'll be using that one. :p
 

Galdiuz

Creator of Photon Command
Reaction score
98
Ah... Well, it was just something i came up with. But it's still strange that you need 2 of one item. I only needed one of each. Something makes the trigger don't run when you pick up the second item, thus, when you pick up a 3rd item, they will combine. You could try picking up one ring and one claw, and then another item, and see if they combine.
 

BlightWarden

New Member
Reaction score
6
Ah... Well, it was just something i came up with. But it's still strange that you need 2 of one item. I only needed one of each. Something makes the trigger don't run when you pick up the second item, thus, when you pick up a 3rd item, they will combine. You could try picking up one ring and one claw, and then another item, and see if they combine.

Yup, its the third item that causes it to combine. I added in the crystal ball to the game (not the triggers) and when I buy 1 claw and 1 ring then a crystal ball the claw and ring combine into the new item.

So now all I need to do is figure out how to eliminate the need for the extra item and it will work perfectly.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top