function GetUnitNameById takes integer id returns string
local unit u = CreateUnit(Player(12), id, -7000, -11500, 0)
local string s = GetUnitName(u)
call RemoveUnit(u)
set u = null
return s
endfunction
Thats what i ended up with but it's kinda heavy, the triggers detect unit creation then a new variable i don't need all this, can i somehow browse the unit like in Object Manager and take his name from there? or this is only Lua stuff?