Changing dynamic light colors for muzzle flash

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

Moderator: GZDoom 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.

Changing dynamic light colors for muzzle flash

Postby superscrungus » Sun Sep 30, 2018 6:00 pm

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
superscrungus
 
Joined: 27 Sep 2018
Discord: superscrungus#4557

Re: Changing dynamic light colors for muzzle flash

Postby Enjay » Sun Sep 30, 2018 6:14 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Changing dynamic light colors for muzzle flash

Postby superscrungus » Sun Sep 30, 2018 8:10 pm

Ooooh, that's why. Don't know why that didn't occur to me lmfao. Thanks, the advice helped a ton!
User avatar
superscrungus
 
Joined: 27 Sep 2018
Discord: superscrungus#4557


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 1 guest