TriggerRegisterUnitStateEvent problem

Azlier

Old World Ghost
Reaction score
461
JASS:
scope InsanityShoutDeath initializer Initial

private function Conditions takes nothing returns boolean
    return GetUnitTypeId( GetTriggerUnit() ) == 'H000' and GetUnitAbilityLevel( GetTriggerUnit(), 'A004' ) > 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 ), 'u001', x, y, 0.00 )
    call UnitApplyTimedLife( LC, 'BTLF', 5.00 )
    call UnitAddAbility( LC, 'A006' )
    call SetUnitAbilityLevel( LC, 'A006', 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
 

Magoiche

Member
Reaction score
20
Cool.

The more o learn about jass the more i want know about it.
Its so ingenious!

Thanks people, realy.
 
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