This is what I've got so far, it kind of bugs sometimes though (like killing nearby allied units when many enemies stand on it) and I don't know how to remove memory leaks in this special case.
Code:
function Trig_Glyph_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A04O'
endfunction
function triggermine takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local unit u=GetTriggerUnit()
local player p=GetOwningPlayer(u)
local string t_table = I2S(CS_H2I(t))
local unit mine=GetTableUnit(t_table,"mine")
if IsUnitEnemy(mine,p) then
call KillUnit(u)
call RemoveUnit(mine)
call FlushStoredMission(CSCache(), t_table)
set u=null
set mine=null
set p=null
call DestroyTrigger(t)
set t=null
endif
endfunction
function Trig_Glyph_Actions takes nothing returns nothing
local unit caster=GetTriggerUnit()
local player p=GetOwningPlayer(caster)
local real x=GetUnitX(caster)
local real y=GetUnitY(caster)
local unit mine=CreateUnit(p,'h028',x,y,0)
local trigger t=CreateTrigger()
local triggeraction ta
local string t_table=I2S(CS_H2I(t))
call SetTableObject(t_table,"mine",mine)
call TriggerRegisterUnitInRangeSimple(t,100,mine)
set ta=TriggerAddAction(t,function triggermine)
set caster=null
set p=null
set mine=null
endfunction
//===========================================================================
function InitTrig_Glyph takes nothing returns nothing
set gg_trg_Glyph = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Glyph, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Glyph, Condition( function Trig_Glyph_Conditions ) )
call TriggerAddAction( gg_trg_Glyph, function Trig_Glyph_Actions )
endfunction