function stone_action
{
var rotrandom;
var moverandom;
my.pan = random(360);
my.tilt = random(360);
my.roll = random(360);
rotrandom.pan = random(10)-5;
rotrandom.roll = random(10)-5;
rotrandom.tilt = random(10)-5;
moverandom.x = random(10)-5;
moverandom.y = random(10)-5;
moverandom.z = random(10)-5;
while(1)
{
// edit this maby white c_rotate/c_move;
// use events not my specialty for exploding ore changing angles
//ent_remove(my); also event
my.pan +=rotrandom;
my.roll +=rotrandom;
my.tilt +=rotrandom;
my.pan +=rotrandom;
my.roll +=rotrandom;
my.tilt +=rotrandom;
wait(1);
}
}

function stone_spanw
{
while(1)
{
stone_pos.x = random(400);
stone_pos.y = random(400);
stone_pos.z = random(400);
// somthing that checks of there is space for you entity
if(stone <20)//max entity's
{
ent_create("stone.mdl",stone_pos,stone_action);
wait(1);
}
wait(1);
}
}


"empty"