Hi
ich hab mir nen skript zusammen gebastelt
aber ich hab noch ein Problem der fällt vor mir einfach herunter ohne das er nach von geschleudert wird



var weg;
var tumblespeed[3] = 10,0,0;
var drop_dist = 0;
var max_lights = 3;
SOUND bumm = <bumm.wav>;



function fire_bullet()
{
while (drop_dist != 0) { wait(1); }
drop_dist = 60;
p = drop_dist;
set_pos_ahead();
ent_create (bullet_mdl, MY_POS, move_physik);
//waitt(1);
drop_dist = 0;
}

function move_physik()
{
var mySpeed[3];
var earthgravity[3] = 0,0, -386;
var jupiterGravity[3];
ph_setgravity( earthgravity );
vec_set( jupiterGravity, earthGravity );
vec_scale( jupiterGravity, 2.5 );
ph_setgravity( jupiterGravity );
phent_settype (my, ph_rigid, ph_poly);
phent_setmass (my, 10, ph_sphere);
phent_setfriction(my, 30); // friction
phent_setelasticity(my, 95, 0); // bounce a little
}

function fire_bullet2()
{
while (drop_dist != 0) { wait(1); }
drop_dist = 60;
p = drop_dist;
set_pos_ahead();
ent_create (ball_mdl, MY_POS, move_bullet2);
//waitt(1);
drop_dist = 0;
}

function move_physik2()
{
var mySpeed[3];
var earthgravity[3] = 0,0, -386;
var jupiterGravity[3];
ph_setgravity( earthgravity );
ph_setgravity( nullvector );
vec_set( jupiterGravity, earthGravity );
vec_scale( jupiterGravity, 2.5 );
ph_setgravity( jupiterGravity );
phent_settype (my, ph_rigid, ph_poly);
phent_setmass (my, 100, ph_sphere);
phent_setfriction(my, 100); // friction
phent_setelasticity(my, 0, 0); // bounce a little
}




var Light_on;
ON_CTRL set_light;

FUNCTION set_light ()
{
IF (Light_on == 0)
{
Light_on = 1;
vec_set(mat_model.ambient_red,vector(255,0,0));
vec_set(mat_model.ambient_green,vector(255,0,0));
vec_set(mat_model.ambient_blue,vector(255,0,0));
}
ELSE { Light_on = 0;
vec_set(mat_model.ambient_red,vector(0,0,0));
vec_set(mat_model.ambient_green,vector(0,0,0));
vec_set(mat_model.ambient_blue,vector(0,0,0));}
}




function move_bullet()
{
move_physik();
my.pan = camera.pan; // let it fly in view direction, like a bullet
my.roll = camera.roll;
my.tilt = camera.tilt;
// my.event = move_physik;
my.enable_block = on;
my.enable_entity = on;
///////////////////////////////////////////////////////////////////
while (1) {
move_mode = ignore_you;

temp.x = 30 * time;
temp.y = 0;
temp.z = 0;
ent_move(temp,nullvector);


//ent_move(tumblespeed,nullvector);
// loop the entity sound
//ifndef SERVER; // snd_playing does not work on the server because sounds play on the client
// if (snd_playing(my.skill10) == 0) {
// my.skill10 = ent_playsound(my,whosh,200);
// }
//endif;
// change the lights
my.red += 4*time;
my.green += 3*time;
my.blue += time;
// use the modulo function to cycle colors from 0..255
my.red %= 256;
my.green %= 256;
my.blue %= 256;

wait(1);
}

}
}

function move_bullet2()
{
move_physik();
my.pan = camera.pan; // let it fly in view direction, like a bullet
my.roll = camera.roll;
my.tilt = camera.tilt;
// my.event = move_physik2;
my.enable_block = on;
my.enable_entity = on;
///////////////////////////////////////////////////////////////////
while (1) {
move_mode = ignore_you;

temp.x = 30 * time;
temp.y = 0;
temp.z = 0;
ent_move(temp,nullvector);


//ent_move(tumblespeed,nullvector);
// loop the entity sound
//ifndef SERVER; // snd_playing does not work on the server because sounds play on the client
// if (snd_playing(my.skill10) == 0) {
// my.skill10 = ent_playsound(my,whosh,200);
// }
//endif;
// change the lights
my.red += 4*time;
my.green += 3*time;
my.blue += time;
// use the modulo function to cycle colors from 0..255
my.red %= 256;
my.green %= 256;
my.blue %= 256;

wait(1);
}
phent_settype(my, ph_rigid, ph_sphere); // enable physics for this ball
phent_setmass(my, 10, ph_sphere); // the ball has 1kg (2 lbs) and behaves like a sphere
phent_setfriction(my, 30); // friction
phent_setelasticity(my, 99, 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
camera.x = 30;
weg.x = 0;
weg.y = 0;
weg.z = 50;
//temp.x = 30;// * time;
//temp.y = 0;
//temp.z = 0;

}
}
function move_bulle()
{
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 = move_physik;
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);
phent_settype(my, ph_rigid, ph_sphere); // enable physics for this ball
phent_setmass(my, 100, ph_sphere); // the ball has 1kg (2 lbs) and behaves like a sphere
phent_setfriction(my, 30); // friction
phent_setelasticity(my, 96, 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
}

action ball1
{
phent_settype(my, ph_rigid, ph_sphere); // enable physics for this ball
phent_setmass(my, 100, ph_sphere); // the ball has 1kg (2 lbs) and behaves like a sphere
phent_setfriction(my, 75); // friction
phent_setelasticity(my, 99, 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
}
}

on_mouse_left = fire_bullet;
on_mouse_right = fire_bullet2;


A6 Commercial 6.50.6