- Joined
- Oct 15, 2010
- Messages
- 71
How can i make an ability that does stackable damage over time?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function Trig_Burning_Spear_Conditions takes nothing returns boolean
if GetUnitAbilityLevel(udg_GDD_DamagedUnit, 'aaaa')> 0 then
return true
endif
return false
endfunction
function Trig_Burning_Spear_Actions takes nothing returns nothing
local unit DamagedUnit = udg_GDD_DamagedUnit
local unit DamagingUnit = udg_GDD_DamageSource
local integer Index = 0
loop
exitwhen Index == 5
call UnitDamageTarget (DamagingUnit, DamagedUnit, 15, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
set Index = Index + 1
call TriggerSleepAction (1.00)
endloop
endfunction
//===========================================================================
function InitTrig_Burning_Spear takes nothing returns nothing
set gg_trg_Burning_Spear = CreateTrigger( )
call TriggerRegisterVariableEvent( gg_trg_Burning_Spear, "udg_GDD_Event", EQUAL, 0 )
call TriggerAddCondition( gg_trg_Burning_Spear, Condition( function Trig_Burning_Spear_Conditions ) )
call TriggerAddAction( gg_trg_Burning_Spear, function Trig_Burning_Spear_Actions )
endfunction
Just to make it clearer, Huskars Burning Spears do not give any buff to the target of attack.
Just to make it clearer, Huskars Burning Spears do not give any buff to the target of attack.
