Changing dynamic light colors for muzzle flash

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
superscrungus
Posts: 10
Joined: Thu Sep 27, 2018 9:30 pm

Changing dynamic light colors for muzzle flash

Post by superscrungus »

Apologies if I'm clogging the topic index with a really simplistic question.

So, as you can tell, I'm trying to change the colors on the dynamic light pools that appear when a weapon fires. Specifically, I'm trying to change the shotgun's flash to teal, attach an alternating teal/blue firing pattern to the plasma rifle, and attach a white flash to the BFG (not it's projectile).

I've successfully redefined the dynamic lights on non-hitscan projectiles such as the plasma rifle's, but I'm stumped on how to apply these effects to the weapons themselves. It's obviously quite jarring when my modded shotgun has a bright teal muzzle flash, but the light it produces on it's surroundings is bright yellow.

I've been looking into it for the past day, but tackling this issue has been hard because I'm easily confused and admittedly not the brightest. Any help is appreciated!
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Changing dynamic light colors for muzzle flash

Post by Enjay »

The "problem" is that the muzzle flash light is generated by the player and attached to his firing frame.

I don't know if there is a better way but, in the past, if I've had a hitscan weapon with a flash that didn't suit the default colour, I defined an invisible, short lived projectile with a suitably coloured light attached and then fired the projectile at the same time as the hitscan attack. The projectile lasts just long enough to create a coloured flash around the player and then disappears.
User avatar
superscrungus
Posts: 10
Joined: Thu Sep 27, 2018 9:30 pm

Re: Changing dynamic light colors for muzzle flash

Post by superscrungus »

Ooooh, that's why. Don't know why that didn't occur to me lmfao. Thanks, the advice helped a ton!
Post Reply

Return to “Assets (and other stuff)”