:
var i;
for (i=0; i<5; i++) // repeat 5 times
x *= x; // calculate the 5th power of x
edit: Adding something to an array (if i remember right) looks like this:
var my_array[100];
var my_index;
var i;
//add
c_scan
if(you)
{
my_Array[my_Index] = handle (you);
my_index += 1;
}
But this is a long time ago i used a array with 3dgs
Edit2: theres an simple way to go through all ents with an "for" then using vec_dist, but i cant remember.
Edit3: This is what i meant. U could modify it with vec_dist etc. to check for all ents
function hide_all_ents()
{
// repeat for all entities
for(you = ent_next(NULL); you; you = ent_next(you))
set(you,INVISIBLE); // make entity invisible
}
}