ok, habe es jetzt mit der box hinbekommen.
nur das letzte problem jetzt, das mein player langsam schweben tut. langsam steigt er in die höhe. wie kann das den in meinen codes sein? bitte um letzte hilfe smile
Code:
action player_action //main player
{   
chrisgamble=me;
      wait(1);
      my.scale_x=0.51;my.scale_y=0.51;my.scale_z=0.51;
      player = me;
//      my.polygon = on;
      my.narrow = on;
      my.fat = on;
      my.shadow =on;
      my.cast =on;
      my.health = 100;
      my.enable_entity=on;
      loadControlsDefault(); //this sets up controls and assigns keys...uses the new template misc_input file
      initCameras();
      camActive = 1;
      cameraMove();  
		wait(1);
		c_setminmax(my); 
		wait(5);
		my.max_x = 14;
		my.max_y = 14;
//		my.max_z = 25;
		my.min_x = -14;
		my.min_y = -14;
//		my.min_z = -41;
		wait(5);
      you = ent_create("drop.mdl",my.x,weapon_John);
      setWeaponPlayer(my);
      setWeapon(1550,1541,1566);
      while(my.health > 0)
		{
			if (c_trace(my.x,vector(my.x,my.y,my.z-5000),IGNORE_ME |	IGNORE_PASSABLE | GLIDE) > 0)
			{					}



Code:
function environmentForces() // gravity and the like
{
		you = null;
		vec_set (temp,player.x);
		temp.z -= 4000;
		result = c_trace (player.x,temp, ignore_me + ignore_passable + ignore_passents); //distance to the ground?
		result += player.min_z;
		my_height = c_trace(player.x, temp,  ignore_passable + ignore_passents +USE_BOX);
		my_height = (result + 2 * my_height) / 3;
		if (16 / time_step > 10) 
		{
			abs_force.z = -0.5 * my_height; //move him up, if stuck in the ground and fps > 10
		} 
		else 
		{
			if (my_height < 0) 
			{ 
			   player.z -= my_height; 
			   vec_set (player._velocityx, nullvector);
			   vec_set (player._abs_velx, nullvector); 
			} // prevent shaking
		}
		friction = 2.1; //ground friction                  PLAYER SPEED!!!!!!!!!!!!!!!
}