function ME takes nothing returns nothing
//I never said it, but Locations are stupid. Use x/y coordinates whenever you can.
local real tX = GetOrderPointX()
local real tY = GetOrderPointY()
local string s = "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl"
//Before, you created the effect twice and never removed the first one.
call DestroyEffect(AddSpecialEffect(s, GetUnitX(gg_unit_H000_0000), GetUnitY(gg_unit_H000_0000)))
//SetUnitX/Y is also nice.
call SetUnitX(gg_unit_H000_0000, tX)
call SetUnitY(gg_unit_H000_0000, tY)
call DestroyEffect(AddSpecialEffect(s, tX, tY))
//And done. We didn't have to clear up anything this time
endfunction
function InitTrig_MEffects takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent(t, gg_unit_H000_0000, EVENT_UNIT_ISSUED_POINT_ORDER )
call TriggerAddAction(t, function ME )
set t = null
endfunction