zu 1 war schon fast richtig, aber das player davor muss weg also

if ( getdistance player <= xxx )
set...