Also, das mit dem Physikobjekt hat geklappt, aber wie mache ich das, dass das Physikobjekt mit dem Player und mit dem Geschoss agiert?

Mein Playerscript:
Code:
 
action player1
{
player = my;
my.invisible = on; // hide the player model
my.light = 1;
my.lightrange = 0;

while (1)
{
vec_set (camera.pos, my.pos);
camera.pan = my.pan;
camera.tilt += 10 * mouse_force.y * time;
my.pan -= 10 * mouse_force.x * time;
temp.x = 10 * (key_w - key_s) * time;
temp.y = 5 * (key_a - key_d) * time;
temp.z = 0;
ent_move (temp, nullvector);
wait (1);

}


}


Mein Bulletscript:
Code:
 
function fire_bullet()
{
ent_create (bullet_mdl, camera.x, move_bullet);
}

function move_bullet()
{
my.unlit = on;
my.enable_block = on; // the bullet is sensitive to level blocks
my.enable_entity = on; // and entities
my.enable_impact = on;
my.pan = camera.pan;
my.tilt = camera.tilt;
my.event = remove_bullet;
while(1)
{
if (vec_dist (my.x, camera.x) < 50)
{
my.passable = on;
}
else
{
my.passable = off;
}
temp.x = 30 * time;
temp.y = 0;
temp.z = 0;
move_mode = ignore_you + ignore_passable + glide;
ent_move (temp, nullvector);
wait(1);
}
}

function remove_bullet()
{
wait (1);
ent_remove(me);
}



Mein Physikobjektscript:
Code:
 
action ball1
{
my.light = on;
my.transparent = on;
my.alpha = 75;
my.lightrange = 100;
my.green = 0;
my.red = 10;
my.blue = 0;
phent_settype(my, ph_rigid, ph_sphere); // enable physics for this ball
phent_setmass(my, 1, ph_sphere); // the ball has 1kg (2 lbs) and behaves like a sphere
phent_setfriction(my, 30); // friction
phent_setelasticity(my, 30, 0); // bounce a little
temp.x = 0;
temp.y = 0;
temp.z = -380; // earth gravity factor, g = 9.81 m/s2
ph_SetGravity(temp); // set gravity
while (my.z > -150) {wait (1);} // the ball has approached the floor
sleep (3); // give it 3 more seconds
phent_setelasticity(my, 0, 0); // stop bouncing
sleep (3); // give it 3 more seconds
phent_settype(my, 0, ph_sphere); // now stop the ball
}



Könnt ihr mir helfen?

mfg
Glibos