try put this function and change in the start of your code
if you get a error, double definition or some thing like this, look if you do not have include this in your main script includes like newtinScript2.wdl
if yes, just delet the defines lines and function.

Code:


define newtonGravity, -700.0;
define mass, skill1; // you need set this in your behaviors entity window
define linear_drag, skill2;
define angular_drag_x, skill3;
define angular_drag_y, skill4;
define angular_drag_z, skill5;
define health, skill6;
define shape_factor, skill7;
define collision_groupId, skill8;
define collision_sph_box, flag1;
define start_active, flag2;
define compound_collision, flag3;
define destructible, flag4;
define spawn_children, flag5;

function ApplyGravityForceEvent(body)
{
var bodyMass;

bodyMass = NewtonGetBodyMass (body);
NewtonBodyAddForce (body, 0, 0, bodyMass * newtonGravity);
NewtonBodyAddTorque (body, 0, 0, 0);//

// apply buoyancy force to the boby if any
ApplyBuoyancy (body);
wait(1); // For not use so much CPU you can encrese this but you
// get a delay in action
}

ACTION pod
{
player=my;
score.visible=on;
NewtonGetBody (my);
newtoncreategravityentity(wood_material);
NewtonSetBodyActiveState (body,1);

while(1)
{

ApplyGravityForceEvent(my)
////camera////

update_views();
camera_to_target();

////walking////
ent_cycle("core", my.skill48 % 100); // wiederhole die Animation endlos
my.skill48 += 8 * time;





////controle////
if (key_cuu==1)
{

laufen=1;
ent_cycle("run", my.skill48 % 100);

}
else
{
laufen=0;
}

if (key_cud==1)
{

laufen=-1;
}
if (key_cul==1)
{
my.pan+=5*time;
}
if (key_cur==1)
{
my.pan-=5*time;
}


wait(1);
}
}

}




I hope it help you.

Tel me if it works.

best regards,

Marcio