|  | ||
| 
 | 
 int near_entity2( int e_type, int x, int y ); 
 int e_type; // An integer entity flag int x; // An integer x-coordinate int y; // An integer y-coordinate 
 | 
 | ||||||||||||
| Synopsis | #include "silver.h" 
 The near_entity2 function works like near_entity1 with two exceptions. First, near_entity2 will only pick entities from the current q-group. Second, near_entity2 will only consider entities that are currently visible and in the current window. 
 | 
 | ||||||||||||
| 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_entity2 returns zero if there is no q-group defined, otherwise it returns the number of items in the q-group that satisfied the selection conditions. 
 | 
 | ||||||||||||
| Remarks | near_entity2 can be used to limit a user's options when picking, by forcing their selection to come from the current q-group. It can also be used to disambiguate among entities returned via near_entity1. 
 | 
 | ||||||||||||
| See Also | near_entity1, get_group_item, pick_entity 
 | 
 | ||||||||||||
| Example | The following code changes the edge and surface color of the best candidate objects that have a prefix of "claw": 
 
 
 
 | 
 |