Garry's Mod

Garry's Mod

80 ratings
[Glow Eyes] Half-Life 2
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Roleplay, Scenic, Realism
File Size
Posted
Updated
49.704 KB
Jan 22, 2024 @ 3:32pm
Mar 24, 2024 @ 12:53am
36 Change Notes ( view )

Subscribe to download
[Glow Eyes] Half-Life 2

Description
About
THIS ISN'T VERY OPTIMIZED, REFER TO THE NEWER VERSION: GLOWLIB
Is Glow Eyes a base? I don't really know.
Well, this addon only adds support for the default Half-Life 2 Combine Soldier Models.
Almost completely re-written on 2/14/2024 (M/D/Y) to provide E:Z 2 Glow Style Effect
I recommend using this with Volume Lights for HL2, colors might not be the exact same, but yeah.

Make sure to check out Glow Eyes: Metropolice Pack and Glow Eyes: Nemez Combine Soldier Pack

Commands
gloweyes_enabled (0 or 1)
gloweyes_ragdolls (0 or 1) Requires gloweyes_enabled to be set to 1!
gloweyes_players (0 or 1) Requires gloweyes_enabled to be set to 1!

Developers
You can make a new folder in garrysmod/addons called for example "mygloweyes" and make a folder inside called lua and inside lua another folder called gloweyes. After than you can make a .lua file inside gloweyes and use the code provided below to play around with the values of custom models you want to use.

Functions:
glowEyes:Register(model, glowData)
Hooks:
ShouldRenderGlowingEyes(ent)

Example code from the addon itself:
glowEyes:Register("models/combine_soldier.mdl", { serverInit = function(self, ent) if not ( IsValid(ent) ) then return end if ( IsValid(ent.worldGlowSprite) ) then ent.worldGlowSprite:Remove() end if ( IsValid(ent.leftEyeGlow) ) then ent.leftEyeGlow:Remove() end if ( IsValid(ent.rightEyeGlow) ) then ent.rightEyeGlow:Remove() end local attachment = ent:GetAttachment(ent:LookupAttachment("eyes")) if not ( attachment ) then return end local pos = attachment.Pos pos = pos + attachment.Ang:Forward() * -0.2 local leftEyePos = attachment.Pos leftEyePos = leftEyePos + attachment.Ang:Right() * -1.7 leftEyePos = leftEyePos + attachment.Ang:Forward() * -0.2 local rightEyePos = attachment.Pos rightEyePos = rightEyePos + attachment.Ang:Right() * 1.7 rightEyePos = rightEyePos + attachment.Ang:Forward() * -0.2 local lColor, rColor, gColor = Color(0, 255, 255), Color(0, 255, 255), Color(0, 255, 255) if ( self.color and isfunction(self.color) ) then lColor, rColor, gColor = self:color(ent) end ent.leftEyeGlow = ents.Create("env_sprite") ent.leftEyeGlow:SetPos(leftEyePos) ent.leftEyeGlow:SetParent(ent, ent:LookupAttachment("eyes")) ent.leftEyeGlow:SetKeyValue("rendermode", "9") ent.leftEyeGlow:SetKeyValue("renderamt", "255") ent.leftEyeGlow:SetKeyValue("rendercolor", lColor.r .. " " .. lColor.g .. " " .. lColor.b) ent.leftEyeGlow:SetKeyValue("renderfx", "0") ent.leftEyeGlow:SetKeyValue("HDRColorScale", "0.5") ent.leftEyeGlow:SetKeyValue("model", "sprites/light_glow02_add_noz.vmt") ent.leftEyeGlow:SetKeyValue("scale", "0.05") ent.leftEyeGlow:Spawn() ent.rightEyeGlow = ents.Create("env_sprite") ent.rightEyeGlow:SetPos(rightEyePos) ent.rightEyeGlow:SetParent(ent, ent:LookupAttachment("eyes")) ent.rightEyeGlow:SetKeyValue("rendermode", "9") ent.rightEyeGlow:SetKeyValue("renderamt", "255") ent.rightEyeGlow:SetKeyValue("rendercolor", rColor.r .. " " .. rColor.g .. " " .. rColor.b) ent.rightEyeGlow:SetKeyValue("renderfx", "0") ent.rightEyeGlow:SetKeyValue("HDRColorScale", "0.5") ent.rightEyeGlow:SetKeyValue("model", "sprites/light_glow02_add_noz.vmt") ent.rightEyeGlow:SetKeyValue("scale", "0.05") ent.rightEyeGlow:Spawn() ent.worldGlowSprite = ents.Create("env_sprite") ent.worldGlowSprite:SetPos(pos) ent.worldGlowSprite:SetParent(ent, ent:LookupAttachment("eyes")) ent.worldGlowSprite:SetKeyValue("rendermode", "9") ent.worldGlowSprite:SetKeyValue("renderamt", "60") ent.worldGlowSprite:SetKeyValue("rendercolor", gColor.r .. " " .. gColor.g .. " " .. gColor.b) ent.worldGlowSprite:SetKeyValue("renderfx", "0") ent.worldGlowSprite:SetKeyValue("HDRColorScale", "1") ent.worldGlowSprite:SetKeyValue("model", "sun/overlay.vmt") ent.worldGlowSprite:SetKeyValue("scale", "0.2") ent.worldGlowSprite:Spawn() timer.Simple(0.1, function() local glowTable = {} if ( IsValid(ent.leftEyeGlow) ) then glowTable[#glowTable + 1] = ent.leftEyeGlow end if ( IsValid(ent.rightEyeGlow) ) then glowTable[#glowTable + 1] = ent.rightEyeGlow end if ( IsValid(ent.worldGlowSprite) ) then glowTable[#glowTable + 1] = ent.worldGlowSprite end net.Start("glowEyes.NetworkLightsToClientside") net.WriteEntity(ent) net.WriteTable(glowTable) net.Broadcast() ent.glowEyesTable = glowTable end) end, color = function(self, ent) if ( ent:GetSkin() == 1 ) then return Color(255, 80, 0), Color(255, 80, 70), Color(255, 80, 0) end return Color(0, 255, 255), Color(0, 255, 255), Color(0, 255, 255) end, serverThink = function(self, ent) if ( IsValid(ent.leftEyeGlow) ) then ent.leftEyeGlow:SetKeyValue("rendercolor", select(1, self:color(ent)).r .. " " .. select(1, self:color(ent)).g .. " " .. select(1, self:color(ent)).b) end if ( IsValid(ent.rightEyeGlow) ) then ent.rightEyeGlow:SetKeyValue("rendercolor", select(2, self:color(ent)).r .. " " .. select(2, self:color(ent)).g .. " " .. select(2, self:color(ent)).b) end if ( IsValid(ent.worldGlowSprite) ) then ent.worldGlowSprite:SetKeyValue("rendercolor", select(3, self:color(ent)).r .. " " .. select(3, self:color(ent)).g .. " " .. select(3, self:color(ent)).b) end end })
Popular Discussions View All (2)
6
Mar 9, 2024 @ 1:24am
PINNED: Bug Reports
bloodycop
1
Feb 29, 2024 @ 12:23pm
Alright, why the hell is this not front page?
Benryisdaboi
69 Comments
bloodycop  [author] Dec 23, 2024 @ 1:43pm 
No, I won't touch it anymore.
Headcrab Dec 23, 2024 @ 1:42pm 
not the colors its just the look of the thumbnail
bloodycop  [author] Dec 23, 2024 @ 11:41am 
No, I won't be changing the colors
Headcrab Dec 23, 2024 @ 11:28am 
Can you change the glow to the one in THE TUMBNAIL
Pe causa Nov 20, 2024 @ 6:00pm 
Please port for half life 2
UNIT1 Nov 14, 2024 @ 6:53pm 
Ah yes the prototype for glowlib
I still like this mod tho!
Headcrab Nov 10, 2024 @ 8:19am 
THIS IS SO GOOD
bloodycop  [author] Jul 17, 2024 @ 6:39pm 
Also you should re-direct to GlowLib, it's a better version of this https://steamcommunity.com/sharedfiles/filedetails/?id=3279071164
bloodycop  [author] Jul 17, 2024 @ 5:48pm 
Metrocop doesn't have glowing eyes, go install E:Z2 Metropolice and the glowlib support for it if you want that, or Metropolice Pack
Azo Jul 17, 2024 @ 5:42pm 
no metrocop?