Yes but there will be no detailed shadows projected on player. And it may be a pain in the back to code it for every simple shadow casting model, for tweaking the distance properly.
Anyway;
Anyway;
If EntityDistance( Player, Tree ) < 300 EntityColor Player, 100, 100, 100 EndIf