that's the code what i using for this...
_______________________________________________________________________________
function dist_car(){
while(player == null){wait(1);}
if(player == carro1){
if(vec_dist(carro1.x, me)>10000){
return (1);
}else{
return (5);
}
}
}
action act_Trigger
{
while(carro1 == null){wait(1);}
while(ptr_for_name(nome_do_modelo) == null){ wait(1);}
my.skill48 = handle(ptr_for_name(nome_do_modelo));
while(1){
if(dist_car() ==1){
you = ptr_for_name(my.skill48);
//time_smooth = 0.5;
my.frame = 2;
my.skill1 += my.frame*(time_step/16);
//ent_animate(me, string_a_ser_animada, my.skill1, anm_cycle);
ent_cycle("AnimationSet_gu",my.skill1);
}
wait(1);
}
}
________________________________________________
please anybody help me.
thanks