Code help with render

Does anyone know a way to make it so that all sprites I am not within 200 pixels of unrender and turn into tilemap blocks?
Any help is appreciated.
i am using @jwunderl 's sprite util extension to detect sprites within a radius
Thenerdy1