Posted By: GaniX
view ent - 09/14/13 18:34
hi , i have a question :
if i use a view entity to make a coltshell of the gun . when i use a machinegun for example , i must declarate all of the coltshell or i can reuse the first original?
if i use a view entity to make a coltshell of the gun . when i use a machinegun for example , i must declarate all of the coltshell or i can reuse the first original?
Code:
ENTITY*coltshell= { type = "coltshell.mdl"; flags2 = OVERLAY |PASSABLE; layer = 0; scale_x = 1.5; scale_y = 1.5; scale_z = 1.5; x = 30; y = -6; z = -2; } function animate_gun() { ... if (gun_percent<50)//no shot or coltshell in the air { coltshell.alpha = 0; coltshell.flags2 |= INVISIBLE |TRANSLUCENT; coltshell.tilt = 0; coltshell.y = -6; coltshell.z = -2; coltshell.x = 30; coltshell.pan = 0; }else{ sonidodisp+=1; if(sonidodisp==1)snd_play(shot, 100, 0);// shoot or //coltshell in t air coltshell.flags2 |= SHOW; coltshell.pan+=(2+random(20))*time_step; coltshell.tilt+=(2+random(20))*time_step; coltshell.y-=(1.7+random(1))*time_step; coltshell.z+=(1.7+random(1))*time_step; ...