Code:
function ChargedBolt takes nothing returns nothing
local unit Caster = GetSpellAbilityUnit()
local unit Target = GetSpellTargetUnit()
local unit Launcher
call CreateNUnitsAtLoc(1, udg_ChargedBoltLauncher[GetUnitAbilityLevelSwapped('A000', Caster)], GetOwningPlayer(Caster), GetUnitLoc(Caster), 270.00)
set Launcher = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', Launcher )
call IssueTargetOrderBJ( Launcher, "attackonce", Target)
endfunction