my problem seams quite simple in the first place. I want tu use an item via trigger. The inventory of the unit is searched and if the correct item is found, it should be simply used. (its an instant effect item)
But I cant figure out a way to do it. I thought I may use the issue order command. But I cant find a "use" abiltity. Do I have to use the Inventory ability of the different heroes? The problem with this would be that every hero has its own, unique inventory ability.
I don't think you can use the item directly. But you can always mimic its effects and remove the item. It should be relatively simple with an instant effect. Basically just create the item's effect at the position of the hero unit.
Its an item with unlimited charges and a cooldown. If I just mimic the item effect I would also need to mimic all of its validators and error messages which means double work.
As there is a "order targeting item" I thought it has to be possible!?
AFAIK "order targeting item" is another way of targeting units (since items are units.) I don't think it can be used to execute an item's ability. Probably a relic from the unfinished item system. You can check to see if there is an item library here that would create the effect you're looking for.
Otherwise, if your validators are all tied through the item's effects rather than the item then there really isn't much extra work to do. The problem would be getting the item to activate its cooldown, which is another thing that seems unfinished. As a work-around, maybe remove the item and replace it with a dummy item that can't be activated. Once the cooldown timer expires, swap the item back in.
Hi,
my problem seams quite simple in the first place. I want tu use an item via trigger. The inventory of the unit is searched and if the correct item is found, it should be simply used. (its an instant effect item)
But I cant figure out a way to do it. I thought I may use the issue order command. But I cant find a "use" abiltity. Do I have to use the Inventory ability of the different heroes? The problem with this would be that every hero has its own, unique inventory ability.
@Freddy2287: Go
I don't think you can use the item directly. But you can always mimic its effects and remove the item. It should be relatively simple with an instant effect. Basically just create the item's effect at the position of the hero unit.
Its an item with unlimited charges and a cooldown. If I just mimic the item effect I would also need to mimic all of its validators and error messages which means double work.
As there is a "order targeting item" I thought it has to be possible!?
AFAIK "order targeting item" is another way of targeting units (since items are units.) I don't think it can be used to execute an item's ability. Probably a relic from the unfinished item system. You can check to see if there is an item library here that would create the effect you're looking for.
Otherwise, if your validators are all tied through the item's effects rather than the item then there really isn't much extra work to do. The problem would be getting the item to activate its cooldown, which is another thing that seems unfinished. As a work-around, maybe remove the item and replace it with a dummy item that can't be activated. Once the cooldown timer expires, swap the item back in.
You also wrote about the problem HERE. So I guess the library can not use items instant?
@Freddy2287: Go i don't see your problem. opened editor, set up everything. here is the map. this is worth a like
@FunkyUserName: Go
Nice work. I wonder if they patched it since I last tried doing that or if I've just done it wrong the whole time.
Really... I did EXACTLY what you did (ability, index) and it just dont do anything. Whats the trick?
@Freddy2287: Go
give the ability a button
It has a button.
@Freddy2287: Go
the inventory ability index 3 (effect use instant) , not the item ability.
w/e just filter the map i attached to it's own source and check data