struct Smth
unit u
static hashtable TheHash = InitHashtable()
static method add takes nothing returns boolean
local thistype this = LoadInteger(TheHash, GetTriggeringTrigger(), 0)
return IsUnitType(this.u, UNIT_TYPE_DEAD)
endmethod
static method create takes unit whichUnit returns thistype
local thistype this = thistype.allocate()
local trigger t = CreateTrigger()
set this.u = whichUnit
call SaveInteger(TheHash, t, 0, this)
call TriggerAddCondition(t, Filter(thistype.add))
// etc...
endmethod
endstruct