Originally Posted By: MasterQ32
you can use ent_next to go trough all entities
Code:
for(you = ent_next(NULL); you; you = ent_next(you))
{
if(vec_dist(my.x, you.x) > myDistance)
continue; // Skip unwanted entities
// DO stuff here :

set(you, FLAG1);

}



It is very costly if you have lots of entities in your level. specially in my case where all enemy entities would be using this function frequently.
I don't want to go through all the entities in my level to find who is in the range i am already using cpu power with c_scan.