You are not logged in.
Pages: 1
/*
** Usage:
** id = instance_nearest_notme (x,y,obj);
**
** Arguments:
** x x coord
** y y coord
** obj object to find
**
** Returns:
** id the id of the instance found or noone if none or self is found
**
** GMLscripts.com
*/
var xx; xx = x;
x = -10000000
var ret; ret = noone;
with(instance_nearest(argument0,argument1,argument2))
{
if(id != other.id)
ret = id;
}
x = xx
return ret;
Last edited by icuurd12b422 (2009-03-13 18:09:59)
Offline
i would get rid of that ret variablevar xx;
xx = x;
x = -10000000;
with(instance_nearest(argument0,argument1,argument2))
{
if(id != other.id)
{
other.x=xx;
return id;
}
}
x = xx;
return noone;
Offline
Pages: 1