Hit tick modifications

SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Members, NS2 Playtester, Reinforced - Shadow
<div class="IPBDescription">'Flash' Speedup and sound on hit?</div>I've been looking at the .lua files that govern the functionality of the crosshair flashing when you hit an enemy. My pleas to the devs to make it flash faster so you could distinguish between hits have gone unnoticed so I tried modding it in myself. To no avail!

I'm a bit of a klutz with .lua and I can't get it to work.

I figured out that the code that affects it is in the files GUICrosshair.lua and Player_Client.lua
I tried making some of the values used in the fading functions smaller and larger but they seemed to have no effect.
Would anyone like to give this a try?

Also, I've been wanting a Quake3/Live -like hit sound to figure out why the rifle sometimes hits skulks better and sometimes worse. That would be superb, but I don't know if it's possible. Or allowed.

Comments

  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    If I understood correctly when you hit a target the damage indicator get visible and then fades out during one second.

    If you want sharper feedback I would try something like that, first in GUICrosshair.lua remove the fading out by setting the alpha (last parameter of color) to 1 :

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    // Update give damage indicator.
        local indicatorVisible, timePassedPercent = PlayerUI_GetShowGiveDamageIndicator()
        self.damageIndicator:SetIsVisible(indicatorVisible)
        self.damageIndicator:SetColor(Color(1, 1, 1, 1 ))<!--c2--></div><!--ec2-->

    Then in Player_Client.lua reduce the time the indicator is displayed from one to something like 0.25 :

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    Player.kShowGiveDamageTime = 1/4<!--c2--></div><!--ec2-->

    It should be a bit better.
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Members, NS2 Playtester, Reinforced - Shadow
    Thanks. That's exactly what I wanted.
Sign In or Register to comment.