Some newbie Question

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:

JASS:
function Trig_ShadowStrike_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'AEsh'
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),'h000',GetUnitX(shst),GetUnitY(shst),0)
        call UnitAddAbility(shsdum,'A016')
        call IssueTargetOrder(shsdum,"soulburn",shst)
        call UnitApplyTimedLife(shsdum,'BTLF',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??
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top