| 11-16-2006, 12:57 AM | #2 |
You could add a trigger which detects when a unit uses an item, and sets a boolean variable with array of his player number to true, waits like 1 second and set it to false. The above trigger could check if that boolean variable is true, and if it is it doesn't run. |
| 11-16-2006, 12:35 PM | #4 |
I gave a 1 second wait because the boolean variable I used had an array, with the player number of the owner of the unit using the item. Since you can't cast 2 abilities at the same time with a single unit (There's got to be a casting delay set to your unit), this shouldn't interfere. Oh and 0.1 second can be enough too. Only testing will tell you :P use this though: Set Item_Used[Player number of (Owner of (Triggering unit))] = True and check that same variable if it is false in the other trigger. |
| 11-16-2006, 02:10 PM | #5 |
The Tides of Blood method determines if mana was used, it doesn't care about items. An interesting fact: the ToB triggers for Inquisition have nothing to do with checking mana and the ability is Devotion aura which acts only as a dummy. Edit: Oh, sorry to answer your question. The first thing that comes to mind is generating an array or list of all the item ability IDs and then using a condition IsAbilityItemAbility or something of that sort that loops through and makes a comparison against each returning true if it finds a match. |
| 11-16-2006, 03:12 PM | #6 |
When item abilities are cast, the units current order is not the order of that spell, but 852008-825013 (depending on slot). So You only have to compare the current order to be smaller than or equal to 852013 and greater or equal 852008 and then skip the remaining actions. (corrected) |
| 11-16-2006, 11:23 PM | #7 |
Oh, why thank you for the replies. I'm glad I got this question answered, 'cause it had been giving me a problem. Daxtreme's suggestion seems to make the most sense to me, but I seem to be missing exactly what it is you're saying BertTheJasser... I'm using GUI, and item abilities don't have numbers (as far as I know), so unless you're speaking JASS (which, judging by your name, you probably are) I don't understand what you're getting at. |
| 11-16-2006, 11:33 PM | #8 | |
Every ability has an order which must be issued to use that ability. These are represented by strings in the World Editor ("thunderbolt", "slow", etc.), but in reality are long numbers. Each item slot has it's own order number - slots 1 - 6. These numbers are 852002-852007. So, you can check if the unit's last order was one of those numbers. If they were ordered one of those things, that means they used an item slot. Quote:
They actually are numbers, but that doesn't matter for this situation, Bert was talking about the orders I explained above. |
| 11-17-2006, 06:40 AM | #9 |
I see, well I should have thought about that. What do I have to do to find the number value of a given spell/ability? I know that Cmd + D puts the data into "Raw Data" mode, but that's not what you're saying I need to find (I'm on a Mac, but equivilent PC shortcuts will suffice). Is this information only easily accessable in WEU or other advanced editors? More information on this subject would be greatly appreciated, but if you don't have the heart to answer my new queries, then I thank you for trying anyway. ![]() |
| 11-17-2006, 11:16 AM | #10 |
> What do I have to do to find the number value of a given spell/ability? Ask the game: Events - Unit - A unit owned by Player 1 (Red) Is issued an order with no target Conditions Actions - Custom script: call BJDebugMsg( I2S( GetIssuedOrderId() ) ) Same for the other orders. |
| 11-17-2006, 02:30 PM | #11 |
YOu do not have to find any numbers. It must be dynamical (except if you want to exclude some spells). You do not even have to know any of ther orderids (except the item orderids). |
| 11-18-2006, 12:29 AM | #12 |
Ok, I understand how this is working now, but when I used the debug message to show what orders were being issued, I got the values 852008-825013 instead. Something wrong, perhaps? |
| 11-18-2006, 02:37 PM | #13 |
Ohh.. sorry , you are right, I was wrong. The correct numbers are 852008 to 825013. EDIT:852002 to 825007 are darg&drop orders. |
