Code:
function spell_GetCaster takes nothing returns unit
local integer q = GetAttachedInt(GetSpellAbilityUnit(), "unit")
local unit caster
if ( q == 1 ) then
set caster = udg_Casters1[0]
else
if ( q == 2) then
set caster = udg_Casters2[0]
endif
endif
return caster
endfunction
Is it possible to make this function available from any trigger?
Its a piece of code that i use in many triggers, and because of that i would like to save space by just calling a function when i need to do that.