Garry's Mod

Garry's Mod

72 ratings
Projected Texture Muzzleflash
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Scenic, Realism
File Size
Posted
Updated
14.673 KB
1 Jan @ 2:15am
26 Feb @ 1:08am
7 Change Notes ( view )

Subscribe to download
Projected Texture Muzzleflash

In 1 collection by Jiyū to anzen
Projected Texture Light Effects
7 items
Description
An addon that utilizes Adanced Light Entities to create cool lighting effects that look a lot better than defualt source dynamic lights. Inspired and source code heavily edited from this collection of addons: https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=3181183585

Muzzleflash is compatible with npcs like the turrets, striders, gunships and helicopters too. Should work with most custom weapons if they have proper attachments and fire "EntityFireBullets" in code.



------------------------------------------------------------------------------------

List of ConVars:

PT_Muzzleflash_Light 1/0 - enables/disables muzzleflash effect
PT_Muzzleflash_players 1/0 - enables/disables muzzleflash effect for players
PT_Muzzleflash_NPCs 1/0 - enables/disables muzzleflash effect for NPCs
PT_Muzzleflash_Range (VALUE) - sets range of muzzleflash
PT_Muzzleflash_Light_Color (R, G, B) - sets color of muzzleflash
PT_Muzzleflash_AR2_Muzzle 0/1 - enables/disables muzzleflash color change for ar2 muzzleflashes
PT_Muzzleflash_Cheap 0/1 - enables/disables cheaper spotlight for muzzleflash
PT_Muzzleflash_useeyeattachment 0/1 - enables/disables the use of player eye attachment for light instead of weapon muzzle attachment
PT_Muzzleflash_Cheap_Texture (NAME) - Sets cheap muzzleflash texture. Default: effects/flashlight/soft
PT_Muzzleflash_Blacklist_Add (CLASS) - Adds an entity (can be weapons and npcs) to blacklist
PT_Muzzleflash_Blacklist_Remove (CLASS) - Removes an entity (can be weapons and npcs) from blacklist

------------------------------------------------------------------------------------

The code is a bit messy so there may be bugs, and there is bound to be conflicts- I cannot solve all addon conflicts but I will do what I can. Enjoy the pretty lights though.
Popular Discussions View All (1)
0
27 Apr @ 7:11pm
better position for the muzzle flash
ppela436
58 Comments
Scalpel 22 May @ 6:20pm 
Strange that I don't even have an update let alone has the behavior changed.
bre 21 May @ 4:02pm 
update fixed it, thanks a ton! :csdsmile:
Jiyū to anzen  [author] 20 May @ 5:02pm 
Well that's so confusing to me because I never have this problem at all. Any mods that could mess it up? I'm having trouble replicating it. I will try fixing this now though if possible.
bre 20 May @ 2:10pm 
what the guy below said, but even without arc9 the entity spawning is blocking bullets from any sweps at all at certain angles
hard to use this in actual gameplay because of this bug :(
Scalpel 17 May @ 7:26pm 
I have a bug where with ARC9 weapons I'm actually capable of shooting the light as it spawns. If I am downward about 45 degrees I will shoot the expensive_light entity itself. I believe a fix for this could be to just spawn it "backwards" relative to the player camera's direction so that I can't be aiming at it since its behind my head.
Killa Klappa 3 May @ 3:17am 
Is this like the muzzleflash light thing valve does in l4d2?
screwdriver lobotomy 6 Apr @ 10:34am 
@Toppet how did you fix?
Toppet 4 Apr @ 9:45pm 
nvm i fixed
Toppet 4 Apr @ 9:00pm 
light doesn't appear
Meta 6 Mar @ 1:56am 
i can see in one of the videos your smg muzzleflash position is fine but for me its just behind the barrel