private function a takes nothing returns nothing
local location spellTar=GetSpellTargetLoc()
//local dat d=dat.create(GetTriggerUnit(),spellTar)
call RemoveLocation(spellTar)
//call KT_Add(function tick,d,0.0125)
//call SetUnitPathing(d.u,false)
set spellTar = null // <= this here
endfunction
Edit3: Something amusing, when I removed most of the functions in the trigger (except the init and condition) the processing power rose and never comes down! I am 100% sure its with this code as the problem didn't occur when I cast different spells with the same unit.
I suspected it might have been. Shockwave has a pretty poor reputation for causing lag all on its own.The problem was that the missile speed for the base spell was set to 0. I changed to 1500 and the problem is solved!
Spell base = Shockwave.