Black Mesa

Black Mesa

Ikke nok vurderinger
HUD, Weapon and Crosshair Toggle for Screenshots
Af Major_Tinz
This guide provides a selection of key binding methods to toggle various screen elements on or off for screenshots, without having to access the console.
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
File Location
Locate the file "...\Black Mesa\bms\cfg\autoexec.cfg" on your hard disk where the game is installed.

Make a backup copy of this file in the same location.
File Changes
Edit the file using Notepad. At the end of the file, copy and paste the text below which is italicised. Be careful not to overwrite any existing text in the file:

// Holster or unholster weapon and hide or show crosshair toggle:
bind v "sv_cheats 1;incrementvar hud_crosshair_enable 0 1 1;impulse 200"

// Hide or show crosshair toggle:
bind b "incrementvar hud_crosshair_enable 0 1 1"

// Hide or show HUD toggle:
bind , "incrementvar cl_drawhud 0 1 1"

// Holster or unholster weapon and hide or show crosshair and hide or show HUD toggle
bind . "sv_cheats 1;incrementvar hud_crosshair_enable 0 1 1;incrementvar cl_drawhud 0 1 1;impulse 200"


NOTE:
In the above, we are binding the keys "v", "b", "," and "." to have various toggling effects. You may want to change the bound keys to something else. Also note that cheats have to be enabled for some features, which is done here automatically. To disable cheats, access the Developer Console and enter the command "sv_cheats 0" without the quotes. You could also bind this command to a key.

AVOIDING CHEATS:
If you don't care about having a holster and unholster animation, and / or you want to avoid cheats, you can use these alternative lines below which achieve the same without cheats:

// Holster or unholster weapon and hide or show crosshair toggle:
bind v "incrementvar hud_crosshair_enable 0 1 1;incrementvar r_drawviewmodel 0 1 1"

// Holster or unholster weapon and hide or show crosshair and hide or show HUD toggle
bind . "incrementvar hud_crosshair_enable 0 1 1;incrementvar cl_drawhud 0 1 1;incrementvar r_drawviewmodel 0 1 1"


Save the file and run the game.

The bound keys should now work without having to make changes through the console.
Troubleshooting
If you run into any unwanted issues, either remove the changes from the file or replace the file with the backup that you made.
6 kommentarer
Major_Tinz  [ophavsmand] 21. mar. 2021 kl. 3:29 
Yes, I have bound these two keys in my autoexec.cfg below to hide or show the HUD and Crosshair:

bind , "cl_drawhud 0" // disable HUD
bind . "cl_drawhud 1" // enable HUD
blindside32 16. mar. 2021 kl. 21:56 
Is there a way to hide the crosshair and HUD, but keep the weapons?
Major_Tinz  [ophavsmand] 9. mar. 2020 kl. 0:12 
I have updated the guide to include a top tip from Big Man in the comments to avoid using the cheat. Thanks for your help, really sweet!
Major_Tinz  [ophavsmand] 8. mar. 2020 kl. 23:57 
Thanks Big Man, I'll check it out. :)
Mojiquest #1 Fan 8. mar. 2020 kl. 23:43 
Oh and by the way, you can disable the weapon without sv_cheats by using bind [key] "r_drawviewmodel 0" too. Major thanks for the help still.
Mojiquest #1 Fan 8. mar. 2020 kl. 23:39 
Thanks for the guide mate, it was super helpful.