| 04-20-2008, 11:25 PM | #1 |
I'm trying to make an ability that will force a unit to use an item in its inventory. So, you use this ability, and it'll force ui Key numpad7 Issue is, I don't know the identifier for the Number pad. Anyone know how to accomplish this? Replies are greatly appreciated |
| 04-20-2008, 11:29 PM | #2 |
Try -- JASS:call ForceUIKey("3") |
| 04-20-2008, 11:32 PM | #3 |
yeh. i tried that. it doesnt work balderdash = \ |
| 04-20-2008, 11:34 PM | #4 |
That's unfortunate. You could issue an order to use an ability on an item in an inventory, but that is a bit of a roundabout method. |
| 05-22-2008, 05:24 PM | #5 |
issue with that is that it doesn't work with items that require a target. Theres no key like {Numpad7} ? |
| 05-23-2008, 02:24 PM | #6 |
Don't items have orderids? They were in series, 1 for each slot if I remember correctly. |
| 05-23-2008, 03:26 PM | #7 | |
Quote:
You could try having multiple copies of the "use" ability, with different targeting options. You then replace this ability based on the item in the inventory slot. When the use ability is cast, issue the same order to the item. This method also has an advantage that you can disable the use ability when there is no item or an invalid item in the inventory slot. |
| 05-23-2008, 04:57 PM | #8 |
but this method does not work for items with targets? I've got a lot of work to do then. |
