• Remove hl2 "damage effect"?
    9 replies, posted
Is there a way to remove the viewpunch and the red screen when getting damaged? Thanks in advance.
Check this page, it might be here: [url]http://wiki.garrysmod.com/page/HUD_Element_List[/url]
I think "CHudDamageIndicator" is only for the red bar which shows you were the hit came from, but I am not 100% sure so I will check it out. Thanks for reply. :)
It just removed the red bars which shows the direction where the hit came from and the red screen. The viewpunch is still there. :( Any other ideas?
Perhaps override a hook that determines whether or not to take damage. You could return false but manually set the player's deducted health and check for <0 to kill.
[QUOTE=bitches;49952191]Perhaps override a hook that determines whether or not to take damage. You could return false but manually set the player's deducted health and check for <0 to kill.[/QUOTE] That could work but are you sure this is a good Idea? Well, I guess it would break other addons.
bumb
For the viewpunch it might be CalcView
[QUOTE=Zeh Matt;49981348]For the viewpunch it might be CalcView[/QUOTE] What exactly is your idea? How can I affect the viewpunch when getting damaged with the CalcView hook?
I think he meant something like this:[code] hook.Add( "CalcView", "NoPunch", function( ply, pos, angles, fov ) local view = {} local ang = LocalPlayer():GetViewPunchAngles() if ang.y==0 or ang.p==0 then return end view.origin = pos view.angles = Angle(angles.p-ang.p,angles.y-ang.y,angles.r-ang.r) view.fov = fov return view end) [/code] A better way would be (In theory):[code] hook.Add("Think","NoPunch",function() local ang = LocalPlayer():GetViewPunchAngles() if ang.y!=0 or ang.p!=0 then LocalPlayer():ViewPunchReset() end end)[/code]
Sorry, you need to Log In to post a reply to this thread.