For a better understanding.. The last Problems in English:
When i hit the left mouse button, a bullet is created.
Here´s the code:
[...]
vec_for_vertex(my_vertex.x, my, 155);
[...]
if(my.skill5 == 1 && my.skill93 == 0 && my.skill94 != 0)
{
bulget[bulnumb] = ent_create("bullet.mdl", my_vertex.x, flybullet);
set(bulget[bulnumb], PASSABLE);
vec_set(bulget[bulnumb].pan, my.pan);
bulnumb += 1;
if(bulnumb > 2900)
{
bulnumb = 0;
}
debugvar_1 = bulnumb;
my.skill94 -= 1;
wait(1);
my.skill93 = 1;
}
else if(my.skill5 == 0 && my.skill93 == 1)
{
my.skill93 = 0;
}
[...]
This creates the bullet, set´s the fly angle and the action:
action flybullet()
{
//my.z += 5;
wait(1);
//c_setminmax(my);
my.lightrange = 10;
c_move(my, vector(40*time_step, 0,0), NULL, GLIDE | IGNORE_PASSABLE);
while(1)
{
if(you)
{
if(you.skill90 == 1 && my.client_id != dplay_id)
{
if((you.skill96==0) && (you.skill97>0))
{
you.skill97 -= 200;
break;
}
}
else
{
c_move(my, vector(40*time_step, 0,0), NULL, GLIDE | IGNORE_PASSABLE);
c_scan(my.x, my.pan, vector(360, 0, 10), IGNORE_ME);
}
}
else
{
c_move(my, vector(40*time_step, 0,0), NULL, GLIDE | IGNORE_PASSABLE);
c_scan(my.x, my.pan, vector(360, 0, 20), IGNORE_ME);
}
if(my.x > 735 || my.x < -745 || my.y > 115 || my.y < -1385)
{
break;
}
wait(1);
}
my.lightrange = 60;
ExploA2();
ExploB2();
ExploC2();
ExploD2();
killflare2();
ent_remove(my);
}
The problem is now:
I can shot myself into hell. o.O"
How can i say the bullet, not to hit me and my team members?
The second problem is shown on the next screen:
Actually there should only be 1 bullet...
When i just start a servergame - it creates just 1.
But, when a client joines the game, multiple bullets are created all over the screen when i shot.
I hope someone can help me ^.^