- Reaction score
- 456
set gg_trg_OneTargetOmniSlash = CreateTrigger( )
instead of
set gg_Trig_OneTargetOmniSlash = CreateTrigger( )
instead of
set gg_Trig_OneTargetOmniSlash = CreateTrigger( )
set gg_trg_OneTargetOmniSlash = CreateTrigger( )
instead of
set gg_Trig_OneTargetOmniSlash = CreateTrigger( )
function Trig_Condition takes nothing returns boolean
return GetSpellAbilityId() == 039;A000039;
endfunction
function Trig_Actions takes nothing returns nothing
local unit Caster = GetTriggerUnit()
local unit Target = GetSpellTargetUnit()
local location CasterLocation
local location TargetLocation
local integer Integer
local real Angle
local location PolarProjection
loop
exitwhen Integer >= 5
// Define Locals
set Angle = 360.00 / I2R(Integer)
set CasterLocation = Location( GetUnitX(Caster),GetUnitY(Caster))
set TargetLocation = Location( GetUnitX(Target),GetUnitY(Target))
set PolarProjection = PolarProjectionBJ(TargetLocation,50.00,Angle)
// Actions
call UnitDamageTarget(Caster,Target,2.55 * GetHeroStr(Caster,true),true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call SetUnitPositionLoc(Caster,PolarProjection)
call AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",TargetLocation)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",TargetLocation))
// End Actions, Clear up leaks
call RemoveLocation(CasterLocation)
call RemoveLocation(TargetLocation)
call PolledWait(0.35)
set Integer = ( Integer + 1 )
endloop
set Caster = null
set Target = null
set CasterLocation = null
set TargetLocation = null
set Integer = 0
endfunction
//===========================================================================
function InitTrig_OneTargetOmniSlash takes nothing returns nothing
set gg_trg_OneTargetOmniSlash = CreateTrigger()
call TriggerAddAction( gg_trg_OneTargetOmniSlash, function Trig_Actions )
call TriggerAddCondition( gg_trg_OneTargetOmniSlash, Condition( function Trig_Condition))
endfunction