L
littleking
Guest
I've created a map. It lag when i cast this spell to a hero, but if i cast to a creeps, it doesnt lag. Wonder y?
Here's the script:
What's wrong??
Here's the script:
JASS:
function Trig_ShadowStrike_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;AEsh039;
endfunction
function Trig_ShadowStrike_Actions takes nothing returns nothing
local unit shsc = GetTriggerUnit()
local unit shst = GetSpellTargetUnit()
local unit shsdum
if GetPlayerState(GetOwningPlayer(shsc),PLAYER_STATE_RESOURCE_LUMBER)>4 then
set shsdum = CreateUnit(GetOwningPlayer(shsc),039;h000039;,GetUnitX(shst),GetUnitY(shst),0)
call UnitAddAbility(shsdum,039;A016039;)
call IssueTargetOrder(shsdum,"soulburn",shst)
call UnitApplyTimedLife(shsdum,039;BTLF039;,1)
set shsdum = null
call SetPlayerState(GetOwningPlayer(shsc),PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(GetOwningPlayer(shsc),PLAYER_STATE_RESOURCE_LUMBER)-4)
endif
set shsc = null
set shst = null
endfunction
What's wrong??