Funtion MyEntityColor (Entity, r,g,b) For i=1 to countchildren MyEntityColor(GetChild(Entity, i),r,g,b) next EntityColor Entity, r,g,b end function