Cool! This taught me that "other" can refer to the executing instance even while inside a with-construction, making it a great starting point for many different scripts I've been missing. Thanks! 
By the way, you shouldn't call "point_distance(x, y, other.x, other.y)" twice - instead store it in a temporary variable.
EDIT:
Okay, "other" does not refer to the instance running the script; not in my version of GM anyway. One can, however, use global variables for this.
Oh! Good!
I saw too late.
Local variables can be shared in with-statement by using prefix 'other.' In contrast,
temporal variables that defined wih 'var' can be shared in current script without any prefix.
umm...
If variables are not defined as 'temporary' can be brought up from an arbitrary instance that exists,
otherwise( that is, if the variable is not temporary) it can not be used within other instances by the usage of With statement.
EDIT :
var id_s, distance, distance2;
id_s=noone
distance=argument1
with(argument0)
{
distance2=point_distance(x, y, other.x, other.y)
if distance>distance2 and id!=other.id /*and ...*/
{
id_s=id
distance=distance2
}
}
return id_s
Edited by wnsrn3436, 02 August 2012 - 11:37 AM.