obj
MouseEntered()
var/icon/I=new(icon='icon.dmi',icon_state="select", name="Sel")
src.overlays.Add(I)
MouseExited()
for(var/icon/I in src.overlays) if(I.name=="Sel")// error: I.name: undefined var
src.overlays.Remove(I)
Problem description:
Something like this is impossible, but is any other idea for this? I know icon don't support name var, i can do this with use obj's, but i'm not sure it's good way.
However, also, you can use the {} tags after declaring a new object to define properties.