hi,

can anyone help me please with this code?
i was wondering why this isn't working?

Code:
while(1)
{
   if(key_e)
   {
      NewtonBodySetVelocity((NewtonBody*)mouse_ent->skill99,vectorf(-200,200,200));
   }
   wait(1);
}


and this works:
Code:
while(1)
{
   if(key_e)
   {
      ent_remove(mouse_ent);
      NewtonDestroyBody(nworld,(NewtonBody*)mouse_ent->skill99);	
   }
   wait(1);
}	



under skill99 i have:

Code:
action blockAct()
{
    var panBlock;

    c_setminmax(me);
    set(my, PASSABLE | INVISIBLE);
    panBlock = my.pan;
    wait(3);
    
    you = ent_create("aim.mdl", vector(my.x, my.y, my.z), NULL);
    ent_remove(my);
    wait(3);
    my = you;
    c_setminmax(me);
    my.skill99 = handle(my);
    my.pan = panBlock;
    wait(3);
    NewtonBody *body = newton_addentity(my, 10, NEWTON_BOX, onforceandtorque);
}




Ubi bene, ibi Patria.