One simple way would be
var min_dist = 100;
result = c_scan
if(you)if(vec_dist(my.x, you.x) < min_dist) _found_a_near_ent;
//if(result < 100) _found_a_neaR_ent; //could work
Or u save all found ents in an array then checking all distances to get the "real" nearest ent. Edit: Manual says YOU is automatic set to nearest entity.
Last edited by rayp; 07/31/12 20:00.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|