Quote:
:
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:
Code:
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
Quote:

function hide_all_ents()
{
// repeat for all entities
for(you = ent_next(NULL); you; you = ent_next(you))
set(you,INVISIBLE); // make entity invisible
}
}


Last edited by rayp; 07/31/12 21:20.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;