- Joined
- Jan 4, 2009
- Messages
- 118
JASS:
function Liquid_Fire_Trap_Actions takes nothing returns nothing
local unit u = udg_DrinkingMaster
local unit trap = GetDyingUnit()
local unit dummy
local integer i = GetUnitAbilityLevel(u, 'A042')
if(GetUnitTypeId(GetDyingUnit()) == 'n002' ) then
set dummy = CreateUnit(GetOwningPlayer(u), 'n002', GetUnitX(trap), GetUnitY(trap), 0)
call UnitAddAbility(dummy, 'A043')
call IssuePointOrder(dummy, "flamestrike", GetUnitX(trap), GetUnitY(trap))
call SetUnitAbilityLevel(dummy, 'A043', i)
call UnitApplyTimedLife(dummy, 'BTLF', 1.5)
endif
set u = null
set dummy = null
set trap = null
endfunction
function InitTrig_Liquid_Fire_Trap takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t, function Liquid_Fire_Trap_Actions)
set t = null
endfunction
When I cast this spell. It's will work infinite loop Create unit and Order 1 2 3 time and more not stop...
Why? help me plz!!