well,i specified 3 object to an action,
and now i want choose one of them which is satisfied with the
condition.what should i do?
here is the code:


var the_force;
var the_force_x;
var the_force_y;
var the_force_z;
var target_enemy;

function phy_box_1
{


my.fat = on;
my.narrow = on;
c_setminmax(my);
phent_settype( my, PH_RIGID, PH_box );
phent_enable( my, 1 );
phent_setfriction(my, 50);
ph_setgravity( vector(0,0,-386 ));
phent_setmass(my, 20, PH_box);

while(1)
{
box_hit=c_scan(vector(tp_x,tp_y,tp_z),my.pan,vector(180,180,180),ignore_me);
if(box_hit<70&&box_hit!=0)
{
the_force_z=random(3);
the_force=a;
the_force_x=the_force*cos(tp_pan);
the_force_y=the_force*sin(tp_pan);
phent_addvelcentral(you,vector(the_force_x*5,the_force_y*5,a*1.5));
phent_addtorquelocal(you,vector(a,a,a));
}
wait(1);}
}

edit:when run the script,it says "Entity is not a physic object"

Last edited by Omicron_NEGA; 08/26/08 08:16.

P4 3.6GHz x2 8GB RAM DDR2 GeForce8800GTS