Hi inside3d users,
i want to ask if there is someway to add setmodel line to firebullets function?Or how to add efect function from LordHavocs effectinfo.txt?
I?ve try this but nothing happend:
void(float shotcount, vector dir, vector spread) FireBullets =
{
local vector direction;
local vector src;
makevectors(self.v_angle);
src = self.origin + v_right*10;
src_z = self.absmin_z + self.size_z * 0.7;
ClearMultiDamage ();
while (shotcount > 0)
{
direction = dir + crandom()*spread_x*v_right + crandom()*spread_y*v_up;
traceline (src, src + direction*2048, FALSE, self);
if (trace_fraction != 1.0)
TraceAttack (4, direction);
shotcount = shotcount - 1;
local entity shot;
local vector shotvec;
shotvec = (trace_endpos - self.origin) + (normalize(direction) * 40);
shot = Gyro_Force_Create("gunshot", self.origin);
setmodel (trails, "progs/tracer.mdl");
Gyro_Force_ApplyFalloff_ConeLinear(shot, shotvec, 20, 20);
Gyro_Force_ApplyAffector_Directional(shot, shotvec, 130, FALSE);
Gyro_Force_AddProperty_Instant(shot);
Gyro_Force_Ignore(shot, self);
}
ApplyMultiDamage ();
};
and for railung effect
void(float shotcount, vector dir, vector spread) FireBullets =
{
local vector direction;
local vector src;
makevectors(self.v_angle);
src = self.origin + v_right*10;
src_z = self.absmin_z + self.size_z * 0.7;
ClearMultiDamage ();
while (shotcount > 0)
{
direction = dir + crandom()*spread_x*v_right + crandom()*spread_y*v_up;
traceline (src, src + direction*2048, FALSE, self);
if (trace_fraction != 1.0)
TraceAttack (4, direction);
shotcount = shotcount - 1;
local entity shot;
local vector shotvec;
shotvec = (trace_endpos - self.origin) + (normalize(direction) * 40);
self.effects = (self.effects | TE_TEI_G3);
shot = Gyro_Force_Create("gunshot", self.origin);
Gyro_Force_ApplyFalloff_ConeLinear(shot, shotvec, 20, 20);
Gyro_Force_ApplyAffector_Directional(shot, shotvec, 130, FALSE);
Gyro_Force_AddProperty_Instant(shot);
Gyro_Force_Ignore(shot, self);
}
ApplyMultiDamage ();
};
What i am doing wrong?
________