You might need to set a button for that inventory ability, use ComandButton.
This only works for single use items, I don't have a way for items that require targets yet.
It might seem like it but it isn't. I actually order units in my map to use and item with the inventory ability. take a look at Ability - Commands - Default Button as I said you might need to add the button there. so make your own button for it.
I made a new ability, "Use Item" with "Inventory" as an ability type.
I set the commands so that "Item Instant" was the only available command.
In the triggers, I made a new ability variable which combined my "Use" ability with the index so I could use it in the "Issue Order".
The trigger tells the unit to use the "Use ability" targeting the inventory item.
In game, I get the error "Use is missing a target"
Edit: Sorry, I know I'm asking a lot of questions.. but most of my experience with the editor is from trial and error.. so I don't have a ton of understanding as to WHY some things work.. only that if I do them in a specific way, they will.
I'm trying to do the same thing Pick up & Use item via triggers and have got the same result as JTG2003, with the error that the ability needs a target.
Probably something wrong with the ability but can't figure out what that could be.
did you set the button at the Use (Instant) command of the inventory ability?
The Use (Target) command of the inventory ability is unusable in triggers afaik. I haven't found a way to give both a target item, and a target point/unit to this order.
Edit
ok I just reread it, you've set it correctly, but is the item in that inventory, and are you targeting the inventory item itself?
Have you found a way to use items requiring a target unit?
I know a way it's just that it requires prestoring target unit before issuing the order....isn't there a way to use the item then players gets to manually select target?
If a unit has an item in their inventory, is there a way to tell them to use it through triggers?
Issue order targeting item
You might need to set a button for that inventory ability, use ComandButton.
This only works for single use items, I don't have a way for items that require targets yet.
This "use" ability is something I need to create? It doesn't seem available in the preset abilities.
If I need to create it, what category is it under? "Inventory" ability just seems to be for setting it up, not interacting with it.
@JTG2003: Go
It might seem like it but it isn't. I actually order units in my map to use and item with the inventory ability.
take a look at Ability - Commands - Default Button as I said you might need to add the button there. so make your own button for it.
@Helral: Go
Hmm..Ok.
I made a new ability, "Use Item" with "Inventory" as an ability type. I set the commands so that "Item Instant" was the only available command. In the triggers, I made a new ability variable which combined my "Use" ability with the index so I could use it in the "Issue Order". The trigger tells the unit to use the "Use ability" targeting the inventory item.
In game, I get the error "Use is missing a target"
Edit: Sorry, I know I'm asking a lot of questions.. but most of my experience with the editor is from trial and error.. so I don't have a ton of understanding as to WHY some things work.. only that if I do them in a specific way, they will.
@JTG2003: Go
I'm trying to do the same thing Pick up & Use item via triggers and have got the same result as JTG2003, with the error that the ability needs a target.
Probably something wrong with the ability but can't figure out what that could be.
moved to development/trigger
@JTG2003: Go
did you set the button at the Use (Instant) command of the inventory ability?
The Use (Target) command of the inventory ability is unusable in triggers afaik. I haven't found a way to give both a target item, and a target point/unit to this order.
Edit
ok I just reread it, you've set it correctly, but is the item in that inventory, and are you targeting the inventory item itself?
@Helral: Go
Have you found a way to use items requiring a target unit?
I know a way it's just that it requires prestoring target unit before issuing the order....isn't there a way to use the item then players gets to manually select target?
Here's the work of ZyphreRZO BTW. It's an item utility library that's pretty useful for item usage.
http://forums.sc2mapster.com/resources/trigger-libraries/5636-library-galaxy-item-utility-library
https://discord.com/channels/271701880885870594/273542657136001025/860195232430555156