How to add and delete objects based on distance from the player?

I did this for my game demo, maybe is not the best aproach but it works, at least for me… hope it helps you out.

There is some blend file in the thread