vec_dist(my.x,your.x) quickest way if you're just checking how far something

c_trace(my.x,your.x,IGNORE_ME); for seeing if they can see each other

c_scan(my.x,my.pan,vector(120,0,200),SCAN_ENTS); best used on button presses, returns closest entity =D

Hope this helps!