clone help (again) =P

hi i need more help with my clones i want it so it only moves to somthing if it is within a distance right now my code is
- Code: Select all
if(x < check->x+320)
xvelocity=-2.6;