JASS:
local unit u = GetSpellTargetUnit()
local unit a
local location tl = GetUnitLoc(u)
local unit t = GetSpellAbilityUnit()
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(t), tl, bj_UNIT_FACING )
set a = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', a )
call UnitAddAbility( a, 'A007')
call IssueTargetOrderBJ( a, "soulburn", u )
set a = null
call RemoveLocation( tl )
set t = null
call UnitAddAbility( u, 'Abun')
call UnitAddAbility( u, 'Awan')
call TriggerSleepAction( 45 )
call UnitRemoveAbility( u, 'Abun' )
call UnitRemoveAbility( u, 'Awan' )
set u = null
This happens when a unit casts a spell. The spell is MUI but when I cast it multiple times or other units cast it my computer starts lagging badly...