• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Triggered Incinerate (Stackable Damage)

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi! Thanks for reading.

I want to create an ability like Ursa's passive but with the incinerate ending explotion. Incinerate can't be modified, so it doesn't work for me.

1 - What's a good ability to base the skill of? It has to be a passive buffer with no effect other than "Buffing".

2- How to set to 0 the stackable damage if the buff goes away? Basically, how to detect the buff going away and, therefore, set the damage variable/hash key to 0?

3- Any suggestions about how to proceed? Tips? Ideas? Advices?


I could do it in some inefficient way with GUI, but I wan't to do it in the most efficient way with JASS or vJASS, but I'm not good enough with JASS or deep complex triggering as to achieve this by myself in a good way. Probably the best I could do is do it in GUI and convert it to JASS removing BJ's.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Incinerate can be modified very easy. You have to edit the buff it gives.

'Art - Special' is the animation when the target dies with the buff.
'Art - Target' is the normal animation the target has.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Ahh, more specifications incoming : ).
Adjust whatever you want on the ability but leave it a hero ability.
Then add it via JASS trigger to the unit (call UnitAddAbility).
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I managed to create something really similar to Incinerate. The thing is, any Fire Tower will trigger this, and if a Player 1 fire tower hits several times, and a Player 2 fire tower deals the last hit, the Player2 damage will be added to the Player1 damage, and if Player2 kills it and the unit explodes, the Player2 Fire tower would be exploding the unit releasing the accumulated damage amongs the nearby units. I'm not sure if leave it as it's like a "lucky" thing, or something to make players ensure they kill it, or make it a Co-op feature, or ... some new idea?

Also, most units gets it's special effect destroyed, but other doesn't, and walk all around the map with the attached special effect. I'm not sure what could be the cause =/

JASS:
function Trig_Fire_Incinerate_Conditions takes nothing returns boolean
    return GetUnitAbilityLevel(udg_GDD_DamageSource, 'A006') > 0
endfunction

function Trig_Fire_Incinerate_Actions takes nothing returns nothing
    local integer lvl = GetUnitAbilityLevel(udg_GDD_DamageSource, 'A006')
    local integer Id = GetHandleId(udg_GDD_DamagedUnit)
    local real Damage = (LoadReal(udg_Hash, Id, 2) + I2R((lvl + (4*lvl))))
    local texttag TT
    local unit first
    local effect sfx
    
    call SaveReal(udg_Hash, Id, 2, Damage) // Stacking damage
    call SaveReal(udg_Hash, Id, 3, 3.00) // Buff Time
    call DisableTrigger(gg_trg_Fire_Incinerate)
    call UnitDamageTarget(udg_GDD_DamageSource, udg_GDD_DamagedUnit, Damage, true, true, ATTACK_TYPE_HERO, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
    call EnableTrigger(gg_trg_Fire_Incinerate)    
    
    //TextTag creation
    set TT = CreateTextTag()
    call SetTextTagPermanent(TT, false)
    call SetTextTagText(TT, (I2S(R2I(Damage)) + "!"), 0.036)
    call SetTextTagPos(TT, GetUnitX(udg_GDD_DamagedUnit), GetUnitY(udg_GDD_DamagedUnit), 0)
    call SetTextTagColor(TT, 230, 0, 0, 255)
    call SetTextTagVelocity(TT, (0.08 * Cos(90 * bj_DEGTORAD)), ((0.08 * Sin(90 * bj_DEGTORAD))))
    call SetTextTagVisibility(TT, true)
    call SetTextTagLifespan(TT, 3)
    call SetTextTagFadepoint(TT, 2)
    
    //If the unit dies, make it explode.
    if udg_GDD_Damage + Damage >= GetUnitState(udg_GDD_DamagedUnit, UNIT_STATE_LIFE) then
        call SetUnitExploded(udg_GDD_DamagedUnit, true)
        set udg_SfxQ = (udg_SfxQ + 1)
        set udg_Sfx[udg_SfxQ] = AddSpecialEffect("Abilities\\Spells\\OTher\\Incinerate\\FireLordDeathExplode.mdl", GetUnitX(udg_GDD_DamagedUnit), GetUnitY(udg_GDD_DamagedUnit))        
        set udg_Reals = (udg_Reals + 1)
        call DestroyEffect(LoadEffectHandle(udg_Hash, Id, 4))
        call GroupEnumUnitsInRange(bj_lastCreatedGroup, GetUnitX(udg_GDD_DamagedUnit), GetUnitY(udg_GDD_DamagedUnit), 350, null)
        loop
            set first = FirstOfGroup(bj_lastCreatedGroup)
            exitwhen first == null
            if not IsUnitType(first,UNIT_TYPE_DEAD) and IsUnitEnemy(first, GetOwningPlayer(udg_GDD_DamageSource)) then
                call DisableTrigger(gg_trg_Fire_Incinerate)
                call UnitDamageTarget(udg_GDD_DamageSource, first, Damage, true, true, ATTACK_TYPE_HERO, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
                call EnableTrigger(gg_trg_Fire_Incinerate)
            endif
            call GroupRemoveUnit(bj_lastCreatedGroup, first)
        endloop
    elseif LoadInteger(udg_Hash, Id, 4) == 0 then
        // Special effect attach
        set sfx = AddSpecialEffectTarget("Abilities\\Spells\\OTher\\Incinerate\\IncinerateBuff.mdl", udg_GDD_DamagedUnit, "chest")
        call SaveEffectHandle(udg_Hash, Id, 4, sfx)
        // Add unit to Incinerate Group
        call GroupAddUnit(udg_IncinerateGroup, udg_GDD_DamagedUnit)
    endif
    
    call EnableTrigger(gg_trg_Incinerate_Loop)
    
    set sfx = null

endfunction
//===========================================================================
function InitTrig_Fire_Incinerate takes nothing returns nothing
    set gg_trg_Fire_Incinerate = CreateTrigger(  )
    call TriggerRegisterVariableEvent( gg_trg_Fire_Incinerate, "udg_GDD_Event", EQUAL, 0 )
    call TriggerAddCondition( gg_trg_Fire_Incinerate, Condition( function Trig_Fire_Incinerate_Conditions ) )
    call TriggerAddAction( gg_trg_Fire_Incinerate, function Trig_Fire_Incinerate_Actions )
endfunction

  • Incinerate Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in IncinerateGroup) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in IncinerateGroup and do (Actions)
            • Loop - Actions
              • Custom script: local integer Id = GetHandleId(GetEnumUnit())
              • Custom script: set udg_rvar = (LoadReal(udg_Hash, Id, 3) - 0.5)
              • Custom script: call SaveReal(udg_Hash, Id, 3, udg_rvar)
              • Custom script: if udg_rvar <= 0 then
              • Custom script: call GroupRemoveUnit(udg_IncinerateGroup, GetEnumUnit())
              • Custom script: call DestroyEffect(LoadEffectHandle(udg_Hash, Id, 4))
              • Custom script: endif
        • Else - Actions
          • Trigger - Turn off Incinerate Loop <gen>
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Of course I tried to do it your way but didn't work, even with the original skill with no modification. Do you really think I'm capable of doing all this but not capable of doing "UnitAddAbility()"?

Remember Incinerate is a bit bugged, or at least it doesn't behave as the rest of the abilities. I've never seen it work in a unit that's not a hero, neither in a building...
 
For me, as long as the spell is a custom one based on Incinerate it deals the same damage as the normal incinerate no matter how much you set the damage at the object data of the custom spell...

And this is just for the PASSIVE INCINERATE... I don't know about the active one...

So I suggest to just use the triggers...
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I'm not sure, i don't have the map here, but I think the attack is Artillery or Missile (Splash), that could cause the malfunction... It's the only Incinerate ability I'll use in the map, so , I could use it... But it's an orb effect. Triggering it allows me to do the accumulated explode damage to nearby unit, and to customize it.

Now, i'm wondering... How to call all this only when the tower is attacking? I'm planning to add Inmolation, and that would trigger with the aura damage.
 
Status
Not open for further replies.
Top