Remove Ability when unit morphs

roaaaarrrr

New Member
Reaction score
33
I have a immolation item that is created by triggers. The issue is that every once in awhile, the ability gets stuck on permanently, when it is only supposed to last a certain number of seconds. This always happens during some sort of morph (alchemist to chemical rage, dh to meta, etc, etc). So is there a way in JASS to detect when a unit morphs? I just need to add this to my OnDestroy trigger and the ability will go away any time a unit morphs forms. This is the OnDestroy trigger if that helps...

JASS:
   method onDestroy takes nothing returns nothing
        call ReleaseTimer(.t)
        call .removeUnitList()
        if .empty(.u) or IsUnitInvincible(.u) or  then
            call UnitRemoveAbility(.u,AbilityId)
        endif 
        set .u=null
    endmethod
 

Laiev

Hey Listen!!
Reaction score
188
some (or most) of morphs use buff, check the buff
or when you cast the ability which morph set a boolean to true and check that boolean
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top