Azlier
Old World Ghost
- Reaction score
- 461
JASS:
scope InsanityShoutDeath initializer Initial
private function Conditions takes nothing returns boolean
return GetUnitTypeId( GetTriggerUnit() ) == 039;H000039; and GetUnitAbilityLevel( GetTriggerUnit(), 039;A004039; ) > 0
endfunction
private function Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x = GetUnitX( u )
local real y = GetUnitY( u )
local unit LC = CreateUnit( GetOwningPlayer( u ), 039;u001039;, x, y, 0.00 )
call UnitApplyTimedLife( LC, 039;BTLF039;, 5.00 )
call UnitAddAbility( LC, 039;A006039; )
call SetUnitAbilityLevel( LC, 039;A006039;, 2 )
call IssueImmediateOrder( LC, "stomp" )
call DestroyEffect(AddSpecialEffect( "Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl", x,y ))
set u = null
set LC = null
endfunction
private function Initial takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( trig, Condition( function Conditions ) )
call TriggerAddAction( trig, function Actions )
endfunction
endscope