I thought those npc attributes were read-only? Does it work? They still shoot weapons while frozen though I'm guessing.

I was using this to find the nearest enemy. Works like a charm.

Code:
int nearest_enemy(int x, int y){
	int d;int p=9999;int e;
	int e_num = Screen->NumNPCs();
	for(int i = e_num; i>0; i--){
		npc enemy = Screen->LoadNPC(i);
		if(enemy->X>-4){ 
			int ex = enemy->X;int ey = enemy->Y;
			d = Distance(x,y,ex,ey);
			if(p>d){p=d;e=i;}
		}
	}
	return e;
}