Hi,

Ich habe folgende Funktion:

Code:
 

function good_crystals()
{
VECTOR rotator;
var my_player;
set(my,PASSABLE,TRANSLUCENT);
my.scale_x=0;
my.scale_y=0;
my.scale_z=0;
my.material=mat_crystal;
my.alpha=75;
vec_set(rotator,vector(random(3),random(2),random(1)));
while(!p1_vehicle){wait(1);}

while(1)
{
if(my.scale_x<5)
{
my.scale_x+=0.1;
my.scale_y+=0.1;
my.scale_z+=0.1;
}
ent_bonerotate(my,"bone",rotator);
ent_bonerotate(my,"bone1",vector(random(0.5)+1,0,0));

if(del_item==0){
if(vec_dist(my.x,p1_vehicle.x)<150){my_player=1;break;}
if(vec_dist(my.x,p2_vehicle.x)<150){my_player=2;break;}
}
if(del_item==1){ptr_remove(me);return;}
wait(1);
}
ent_create("crystal_exp.mdl",vector(1,0,my.z),crystal_explosion);
ptr_remove(me);
weapon_menu(my_player,0);
}
....
function entscreate_startup()
{
wait(-3);
ent_create("crystal.mdl",vector(map.x+5600,map.y+400,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x+5600,map.y-400,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x+5100,map.y,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x-5600,map.y+400,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x-5600,map.y-400,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x-5100,map.y,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x+400,map.y+5600,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x-400,map.y+5600,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x,map.y+5100,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x+400,map.y-5600,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x-400,map.y-5600,map.z+2000),good_crystals);
ent_create("crystal.mdl",vector(map.x,map.y-5100,map.z+2000),good_crystals);
}





Ok, das Problem ist, dass mit C-Lite die while schleife(siehe oben) unterbrochen wird, und zwar für alle entity!
Das war beim alten C-Script (wdl) nicht so. Ich denke mal das liegt daran dass der my pointer in C-Lite global ist.

Hat jemand eine Idee wie ich mit C-Lite jedes entity unabhängig mache, ohne dass ich lauter einzele pointer erstellen muss?
Gruß Chris