include "user.wdl";

function main{
video_switch(7,0,1);
level_load("Testlvl.wmb");
}

function cam{
camera.x = my.x - fcos(my.pan,200);
camera.y = my.y - fsin(my.pan,200);
camera.z = my.z + 50;
camera.pan = my.pan;
}

function movement{
temp.x = my.x + fcos(my.pan,1000);
temp.y = my.y + fsin(my.pan,1000);
temp.z = my.z;
if key_c == 1{phent_addforceglobal(my,temp.x,my.x);}
}





action usercontrol{
ph_setgravity (vector(0, 0, -500));
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 3, PH_BOX);
phent_setfriction (my, 10);
phent_setdamping (my, 0, 0);
phent_setelasticity (my, 50, 20);
player = my;
while(1){
cam();
movement();
wait(1);
}
}


No but it stops moving after ive pressed c