Yes its a FPS.


Quote:

use entity gun_ent_name ... then for muzzle use vec_for_vertex




Thats the point. I knew this way but it deosnt work at all

I tried:
Code:

entity eCurrent_weapon_ent
{
type=<ak47.mdl>;
x=13;
y=-7;
z=-2.5;
tilt=0;
pan=-10;
flags=visible;//
}

.........
.........
.........
function fadeout
{
sleep(1);
ent_remove(me);
}

var v3Muzzle_pos[3]; //bullet and muzzle pos
while(1)
{ //bit shorter
if(mouse_left)
{
vec_for_vertex(v3Muzzle_pos, eCurrent_weapon_ent, 213);
ent_create("bullet.mdl",v3Muzzle_pos, fadeout); //create bullet
sleep(1.2); //test value
}
}




Im really wondering. I dont get any error, the bullet is spawn, but at the wrong position. (0,0,0) This is strange because on the debug panel I see :

999999
0
0

Hope you can help me


nipx


Edit: sorry my fault. I useed the wrong vars on the debugpanel.

v3Muzzle_pos.a / b / c . Now it shows me the correct value. Why is a/b/c wrong but x/y/z works?

Just add them to the player position, then i get gun position, right?

Last edited by nipx; 11/11/06 04:14.