Garry's Mod

Garry's Mod

Not enough ratings
Picking up items Flash/Fade screen
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun
File Size
Posted
13.658 KB
4 Jul @ 12:02pm
1 Change Note ( view )

Subscribe to download
Picking up items Flash/Fade screen

Description
Sadly, less toggles :(

This addon is inspired by Eris Vizierre's comment which was left out in 11 June 2025 to this addon comment section

Quoting the user:
"I've been looking for an effect like this for when you pick up health or armor items, but no luck."

So this is my attempt to make a code like this....and because I want to imitate Black Mesa Remake fade/flash style when picking up items, such as health kits, armours and ammos

*** THIS CODE IS SERVER-SIDE AND CLIENT-SIDE ***

First of all:

This code is mostly A.I, however several tweaks are by human modifications

Menu is at:

Q key -> Options -> Pickup Fade Effect

+ Support entities for Half-Life SWEPs and Crunchy's Universal Ammo
+ Support HL:Source Entities
+ Support for most HL2 entities
+ Adjustable colours!
+ Test buttons, so you can see which colours you like
+ Independent toggleable, now you can select which fade/flash effects you wish to enable/disable
+ Adjustable Fade/Flash Strength, this could be useful if you don't want your eyes getting wayyyy faded
+ Minimum Time Between Flash toggle, so you can adjust how many seconds you want to wait until the next fade/flash (Maximum is 2 seconds)

Now, bugs and glitches whilst I'm testing this:

1. Fade/Flash on undo-ing an item (Only happens if you spawn an item and within radius of the item)

If you undo or delete a pickup (like a healthkit) while standing close to it, you will see a flash — even if you didn't actually pick it up. This happens because GMod doesn't tell Lua why something was removed.

2. No Fade/Flash After Holding/Grabbing an Item (Problem with if data.held_by_player and CurTime() - data.spawned_at > 0.1 then)

If you grab a pickup with the physgun or press E on it (but haven't collected it yet), then pick it up later, the flash will not show. This is due to GMod not reliably calling touch/pickup hooks for Lua in those cases.

Any playtests and found errors/bugs/glitches, please report to me in the comment sections. Also this haven't been fully tested with other addons, beware.

Otherwise, enjoy!