| 
    | 
   ||
  | 
 int near_entity1( int e_type, int x, int y ); 
 int e_type; // An integer value int x; // An integer value int y; // An integer value 
  | 
  | 
||||||||||||
Synopsis  | 
#include "silver.h" 
 The near_entity1 function builds a q-group of visible entities 'near' the 2D screen coordinate defined by the values of x and y. e_type controls the type type of entities considered. If no entity satisfies the type requirements, or the screen coordinate is invalid, then the current q-group will become empty. 
  | 
  | 
||||||||||||
Parameters  | 
e_type is a bos-level bits1 flag value whose meaning is as follows: 
 
 
 x is the x-coordinate of the 2D point used to select entities y is the y-coordinate of the 2D point used to select entities 
  | 
  | 
||||||||||||
Return Value  | 
near_entity1 returns the number of items in the q-group that satisfied the selection conditions. If the screen position does not resolve to one candidate then all candidates are added to the q-group. 
  | 
  | 
||||||||||||
Remarks  | 
You may not treat e_type as a bit-flag in this function (values may not be Or'd). The reason is that all entities in an entity group (either a named group or the q-group) must have the same type. 
  | 
  | 
||||||||||||
See Also  | 
 
  | 
  | 
||||||||||||
Example  | 
The following code isolates all objects closest to the current 2D cursor position when the user presses the left mouse button: 
 
  | 
  |