MUzzleflash
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
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]
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: Select all
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]
- Stealth Kill
- Posts: 83
- Joined: Fri Dec 29, 2006 12:34 pm
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.
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.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
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.
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest