| 05-17-2007, 12:05 AM | #1 |
In my map, I wish to have many abilities based on immolation. I need to detect when they are turned on and off. Detecting the turning on is no hassle, JASS:if(GetSpellAbilityId() == 'A000') But to turn it off, I've resorted to JASS:if(GetIssuedOrderId() == OrderId("unimmolation")) This will pick up any ability being disabled which is based off of immolation (and as I have stated before, I have many). What would be a more efficient way to detect the disabling of my specific abilities? If not, is it possible to detect the ability unimmolation detected? Thanks, Vedath. |
| 05-17-2007, 12:34 AM | #2 |
If they have different names, can't you just do Trigger: Conditions![]() Name of (YourAbility) is equal to (Name of your ability)Dunno if this will help, as I don't "do" jazz. |
| 05-17-2007, 12:47 AM | #3 |
Problem though; I'm checking what the issued order is in the conditions part. For the initiation, I'm using TriggerRegisterAnyUnitEventBJ(gg_trg_trigger,EVENT_PLAYER_UNIT_ISSUED_ORDER) to detect any order given. Do you think deactivation would be considered a skill as well? Thanks. |
| 05-17-2007, 12:51 AM | #4 |
"unimmolation" should work as long as the Turn Off OrderIdString is that, but make sure that each one isn't that. ![]() |
| 05-17-2007, 01:00 AM | #5 | |
Quote:
Thank you sir, that is brilliant. Now is there any way to create my own Turn Off OrderIdString instead of selecting already existing ones from the list? I have a mild case of OCD with having proper and relevant names for initiators. |
| 05-17-2007, 01:39 AM | #6 |
This thread is full of lose. You can't use custom ID strings. There is no such thing. As long as two abilities share the same base, they share the same orderId and orderString. Period, no matter what. Even if you change the fields in the OE, it doesn't do anything. The only exception is Channel. Use different base spells. Immolation/defend/manashield/magic defense/etc. |
| 05-17-2007, 02:29 AM | #7 |
Ah, I see. Thanks. I guess I'll have to do that then. |
| 05-17-2007, 11:46 AM | #8 |
Or just use string comparison to check the name, like I said earlier. |
| 05-17-2007, 11:52 AM | #9 |
That doesnt always work. The thing is, when you order a unit to use an ability that he has multiple instances of, it will be ordered to use them ALL at once. Then it's just luck determining which actually gets cast. It's not smart. |
| 05-17-2007, 11:52 AM | #10 |
Do the order detection, then check which ability the unit has. It really is tricky to detect the activation and deactivation of such abilities. |
