well, if you do a for loop to index all the npcs, it will include all the npcs. ( I dont know what you mean, 'max' ).
This is an example, of using a for loop with npcs[index]
NPC Code:
//#CLIENTSIDE
if (created) {
speed = 1;
timeout = .05;
}
if (timeout){
for (i=0;i<npcscount;i++){
dx = npcs[i].x - playerx;
dy = npcs[i].y - playery;
dist = (dx*dx+dy*dy);
newx = (dx/dist)*speed;
newy = (dy/dist)*speed;
npcs[i].x += newx;
npcs[i].y += newy;
}
timeout = .05;
}
Thats just an example of how to use it. (npcs move away from player)
help at all?