View previous topic :: View next topic |
Author |
Message |
Stealth Kill
Joined: 29 Dec 2006 Posts: 83
|
Posted: Thu Nov 22, 2007 8:28 pm Post subject: MUzzleflash |
|
|
Are there any Muzzleflash codes?
I had one for 3rd person view (chasecam) from the darplaces mod but i lost it
i need one for fps view to.
Add this to weapons.qc
Code: |
void() MuzzleFlash =
{
local vector vec;
local vector org;
vec = normalize(vec);
makevectors(self.angles);
org = self.angles;
muzzle = spawn();
muzzle.movetype = MOVETYPE_NONE;
setmodel(muzzle, "progs/s_muzzle.spr");
makevectors(self.v_angle);
muzzle.solid = SOLID_NOT;
muzzle.effects = EF_MUZZLEFLASH;
setsize(muzzle, VEC_ORIGIN, VEC_ORIGIN);
if (self.weapon == IT_SUPER_SHOTGUN)
{
setorigin(muzzle, self.origin + v_forward * 20 + '0 0 20' + v_right);
}
else
{
if (self.weapon == IT_SUPER_NAILGUN)
{
setorigin(muzzle, self.origin + v_forward * 20 + '0 0 20' + v_right * CONTENT_WATER);
}
else
{
setorigin(muzzle, self.origin + v_forward * 20 + '0 0 20' + v_right);
}
}
muzzle.nextthink = time + 0.04;
muzzle.think = SUB_Remove;
}; |
[/code] |
|
Back to top |
|
 |
Chip

Joined: 21 Jan 2009 Posts: 314 Location: Romania
|
Posted: Wed Sep 09, 2009 2:23 pm Post subject: Muzzleflash? |
|
|
I did not want to start a new thread if this one existed already.
I'm try to activate the muzzleflash for weapons, and I dug deep into the DP code, but to no avail. I cannot make the muzzleflash to work. Where could I find a tutorial about creating some muzzleflash effects, or how should I go about implementing it in DP?
I would appreciate any answer.
LE: By muzzleflash I mean a powerful flash of light in front of the weapon. I am clarifying this as I found some references to lighting the area when shooting. I would like a graphical sprite or whatever (I guess I can replace a .spr file with a transparent .png. _________________ My Projects: Quake 1 Mods | OpenQuartz 2 | ChipQuake |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Wed Sep 09, 2009 2:38 pm Post subject: |
|
|
maybe look at the shell ejection code? it spawns something like a model (which should also be able to spawn sprites) then it falls or flys away or what ever. maybe alter that code to just project the sprite file then disappear. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
|