| 01-08-2009, 04:55 AM | #1 | |
Ok My current method is really messy and if the hero dies while having the spell turned on they is a high chance that i won't work on. I just some suggestions on how to code it. Yes I know that "unimmolation" triggers when a unit with that kind of ability dies, which is why I'm also relying on the fact it produces a buff on the user. I don't care about the arguments, I just care for suggestions or ways to work around Immolation's flaws. -Av3n EDIT:
|
| 01-08-2009, 05:15 AM | #2 | |
Quote:
What is the method you use? Post up your code. |
| 01-08-2009, 05:54 AM | #3 |
before doing anything check for buff this will fix any problems. |
| 01-08-2009, 08:11 AM | #4 |
It is pretty old and I tried fixing it up but i failed very bad. Which is why I posted up the thread. The code is in the hidden tags. This was back when I started working with on/off abilities as well so expect a lot of noob-ness -Av3n |
| 01-08-2009, 09:00 AM | #5 |
Best way I found as Diod mentioned: - Detect 'on' order to activate. - Run a timer, periodically checking for buff, to determine when its off. |
| 01-08-2009, 09:04 AM | #6 |
just a little off-topic. There's Code:
[hiddenjass] YOUR SCRIPT HERE [/hiddenjass] |
| 01-08-2009, 01:16 PM | #7 |
does dieing not trigger "immolationoff"? |
| 01-08-2009, 09:17 PM | #8 |
Thanks guys @emjlr: that is what I stated in the beginning of the thread. -Av3n |
| 01-08-2009, 11:35 PM | #9 |
A periodic timer checking the presence of immolation buff is the best and safest way to detect unimmolation. |
| 01-09-2009, 05:40 AM | #10 |
Dying does trigger "unimmolation". Check out this JASS:function con takes nothing returns boolean return GetUnitAbilityLevel(GetTriggerUnit(),'AEim') > 0 endfunction function act takes nothing returns nothing if(GetIssuedOrderId()==OrderId("immolation"))then call BJDebugMsg("Immolation is activated.") endif if(GetIssuedOrderId()==OrderId("unimmolation"))then call BJDebugMsg("Immolation is de-activated") endif endfunction function InitTrig_immo takes nothing returns nothing set gg_trg_immo = CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_immo,EVENT_PLAYER_UNIT_ISSUED_ORDER) call TriggerAddCondition(gg_trg_immo,Condition(function con)) call TriggerAddAction(gg_trg_immo,function act) endfunction Either Demon Hunter turns off manually or dies while having Immolation turned on. Message always says "Immolation is de-activated". I assume you have done something wrong with your code, add debug message to check out or maybe try to assign variables instead of using it directly. |
| 01-09-2009, 05:54 AM | #11 |
How come I got the feeling you have mis-read the first post... -Av3n |
