Jump to content
Sign in to follow this  
Kered13

Better health crosshair color

Recommended Posts

I wanted to change my crosshair coloring to be more like my Quake Live config. To do this I wrote a script that gives more flexibility on crosshair health colors.

You can define four colors and three transition points. Color changes are based on effective health (how much damage you can take before dying) instead of naive health or health + armor. This widget preserves all the functionality of the normal crosshair, and is intended as a replacement. The only downside is that the options don't all fit in the menu. If someone can tell me how to fix that, I will.

UPDATE: I have fixed the options menu. I have also added the ability to set your own number of health levels (anywhere from 1 to 100), and an option to interpolate colors between levels.

Up-to-date source code is here.

Screenshots: In-game. The menu.

Share this post


Link to post
Share on other sites

function KeredCrosshair:getOptionsHeight()

        return 370; -- debug with: ui_optionsmenu_show_properties_height 1
end
you must return the height of all your controls combined - should be something around 600

Oh, I wondered what the hell that function was for. I'll get that fixed tomorrow. It will be pretty easy to actually calculate the correct value instead of hard coding it. That way it won't have to be manually changed if I change the options menu.

Share this post


Link to post
Share on other sites

I have fixed the options menu. I have also added the ability to set your own number of health levels (anywhere from 1 to 100), and an option to interpolate colors between levels.

I have also learned tonight that I hate Lua.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×